Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow custom plugin specification in Docker file and other Docker / plugin improvements #1029

Merged
merged 22 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
57 changes: 46 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,47 @@
FROM ubuntu:22.04
RUN apt-get update && apt-get upgrade --yes && apt-get install git python3.9 python3-pip --yes
ADD . /code
WORKDIR /code

# need to use typing-extensions<4 to deal with issue 387 bug: Docker will not build
# TODO: Figure out a better solution or wait for it to resolve itself.
RUN pip install typing-extensions==3.10.0.2
RUN pip install .
RUN ape plugins install alchemy ens etherscan foundry hardhat infura ledger solidity template tokens trezor vyper
RUN pip install eth-rlp==0.3.0
#---------------------------------------------------------------------------------------------
# See LICENSE in the project root for license information.
#---------------------------------------------------------------------------------------------

ARG PYTHON_VERSION="3.9"
FROM python:${PYTHON_VERSION}

RUN apt-get update && apt-get upgrade --yes && apt-get install git

# 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" \
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:/root/.ape --volume $HOME/.vvm:/root/.vvm --volume $HOME/.solcx:/root/.solcx --volume $PWD:/root/project --workdir /root/project apeworx/ape compile"

RUN useradd --create-home --shell /bin/bash harambe
antazoey marked this conversation as resolved.
Show resolved Hide resolved
WORKDIR /home/harambe
COPY . .

RUN pip install --upgrade pip \
&& pip install --no-cache-dir . \
&& ape plugins install \
alchemy \
ens \
etherscan \
foundry \
hardhat \
infura \
ledger \
solidity \
template \
tokens \
trezor \
vyper \
# Fix RLP installation issue
&& pip uninstall rlp --yes \
&& pip install rlp==3.0.0 \
# Validate installation
&& ape --version

USER harambe
ENTRYPOINT ["ape"]
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"hexbytes>=0.2.2,<1",
"py-geth>=3.8.0,<4",
"web3[tester]==6.0.0b4",
# ** Dependencies maintained by Apeworx **
# ** Dependencies maintained by ApeWorX **
"eip712>=0.1.1,<0.2",
"ethpm-types>=0.3.2,<0.4",
"evm-trace>=0.1.0.a6",
Expand Down