-
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dec6b28
commit b5ec523
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#--------------------------------------------------------------------------------------------- | ||
# See LICENSE in the project root for license information. | ||
#--------------------------------------------------------------------------------------------- | ||
|
||
ARG PYTHON_VERSION="3.11" | ||
|
||
FROM python:${PYTHON_VERSION} as builder | ||
|
||
WORKDIR /wheels | ||
|
||
RUN pip install --upgrade pip \ | ||
&& pip install wheel | ||
|
||
COPY . . | ||
|
||
RUN pip wheel . | ||
|
||
FROM python:${PYTHON_VERSION}-slim | ||
|
||
# See http://label-schema.org for metadata schema | ||
# TODO: Add `build-date` and `version` | ||
LABEL maintainer="ApeWorX" \ | ||
org.label-schema.schema-version="2.0" \ | ||
org.label-schema.name="ape-slim" \ | ||
org.label-schema.description="Ape Ethereum Framework." \ | ||
org.label-schema.url="https://docs.apeworx.io/ape/stable/" \ | ||
org.label-schema.usage="https://docs.apeworx.io/ape/stable/userguides/quickstart.html#via-docker" \ | ||
org.label-schema.vcs-url="https://github.com/ApeWorX/ape" \ | ||
org.label-schema.docker.cmd="docker run --volume $HOME/.ape:/home/harambe/.ape --volume $HOME/.vvm:/home/harambe/.vvm --volume $HOME/.solcx:/home/harambe/.solcx --volume $PWD:/home/harambe/project --workdir /home/harambe/project apeworx/ape compile" | ||
|
||
RUN useradd --create-home --shell /bin/bash harambe | ||
COPY --from=builder /wheels/*.whl /wheels/ | ||
|
||
RUN pip install --upgrade pip | ||
RUN pip install /wheels/*.whl | ||
|
||
RUN ape --version | ||
|
||
WORKDIR /home/harambe/project | ||
RUN chown --recursive harambe:harambe /home/harambe | ||
USER harambe | ||
ENTRYPOINT ["ape"] |