From bcb0cf77a133bcfb208f854bc83fa7bc5013ac8a Mon Sep 17 00:00:00 2001 From: sabotagebeats <27985126+sabotagebeats@users.noreply.github.com> Date: Mon, 27 Sep 2021 16:09:09 +0000 Subject: [PATCH 1/7] feat: added dockerfile --- dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 dockerfile diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000000..b1e2fe7e73 --- /dev/null +++ b/dockerfile @@ -0,0 +1,9 @@ +FROM ubuntu:latest +RUN apt-get update && apt-get upgrade -y +RUN apt-get install python3-pip python3 python-is-python3 -y +RUN pip install --upgrade eth-ape +RUN ape plugins add ens -y +RUN ape plugins add etherscan -y +RUN ape plugins add infura -y +RUN ape plugins add solidity -y +RUN ape plugins add vyper -y From 178d7835a11ecd9e52a5ae3001de19f611de7c5e Mon Sep 17 00:00:00 2001 From: sabotagebeats <27985126+sabotagebeats@users.noreply.github.com> Date: Mon, 27 Sep 2021 16:13:49 +0000 Subject: [PATCH 2/7] docs: added installing via docker and link to docker repo --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6fbaa5e19a..c5b1235bb5 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,10 @@ cd ape python3 setup.py install ``` +### via `docker` + +Please visit our [Dockerhub](https://hub.docker.com/repository/docker/apeworx/ape) for more details on using Ape with Docker. + ## Quick Usage Ape is primarily meant to be used as a command line tool. Here are some things you can use ape to do: From bd272bfd07a9ca38f0f3f4a5c31068569840643c Mon Sep 17 00:00:00 2001 From: sabotagebeats <27985126+sabotagebeats@users.noreply.github.com> Date: Tue, 28 Sep 2021 05:25:54 +0000 Subject: [PATCH 3/7] fix: moved dockerfile to Dockerfile --- dockerfile => Dockerfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename dockerfile => Dockerfile (100%) diff --git a/dockerfile b/Dockerfile similarity index 100% rename from dockerfile rename to Dockerfile From 303aad2236c9391723dcb0cc05a9538f347a6d49 Mon Sep 17 00:00:00 2001 From: sabotagebeats <27985126+sabotagebeats@users.noreply.github.com> Date: Tue, 28 Sep 2021 14:06:39 +0000 Subject: [PATCH 4/7] perf: pinned versions, removed python-is-python3, changed -y to --yes --- Dockerfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index b1e2fe7e73..5b18b69fbd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM ubuntu:latest -RUN apt-get update && apt-get upgrade -y -RUN apt-get install python3-pip python3 python-is-python3 -y -RUN pip install --upgrade eth-ape -RUN ape plugins add ens -y -RUN ape plugins add etherscan -y -RUN ape plugins add infura -y -RUN ape plugins add solidity -y -RUN ape plugins add vyper -y +FROM ubuntu:20.04 +RUN apt-get update && apt-get upgrade --yes +RUN apt-get install python3-pip python3.8 --yes +RUN pip3 install --upgrade eth-ape +RUN ape plugins add ens --yes +RUN ape plugins add etherscan --yes +RUN ape plugins add infura --yes +RUN ape plugins add solidity --yes +RUN ape plugins add vyper --yes From 6b845838bc5d12305112a63865b4df5be4bb13fc Mon Sep 17 00:00:00 2001 From: sabotagebeats <27985126+sabotagebeats@users.noreply.github.com> Date: Wed, 6 Oct 2021 01:37:27 +0000 Subject: [PATCH 5/7] feat: entrypoint --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 5b18b69fbd..57247a91b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,3 +7,4 @@ RUN ape plugins add etherscan --yes RUN ape plugins add infura --yes RUN ape plugins add solidity --yes RUN ape plugins add vyper --yes +ENTRYPOINT ["ape"] \ No newline at end of file From a1266bb3f6900d1d0b6723669b1f82de767c6fe5 Mon Sep 17 00:00:00 2001 From: sabotagebeats <27985126+sabotagebeats@users.noreply.github.com> Date: Wed, 6 Oct 2021 06:09:55 +0000 Subject: [PATCH 6/7] fix: docker copy ape and build from . --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 57247a91b8..ed8c33ccc9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:20.04 -RUN apt-get update && apt-get upgrade --yes -RUN apt-get install python3-pip python3.8 --yes -RUN pip3 install --upgrade eth-ape +RUN apt-get update && apt-get upgrade --yes && apt-get install python3-pip python3.8 --yes +COPY . /ape +RUN python3 /ape/setup.py RUN ape plugins add ens --yes RUN ape plugins add etherscan --yes RUN ape plugins add infura --yes From 2b2013719e4f0854383cc25491ad26cc84f1d4d3 Mon Sep 17 00:00:00 2001 From: sabotagebeats <27985126+sabotagebeats@users.noreply.github.com> Date: Thu, 7 Oct 2021 23:56:03 +0000 Subject: [PATCH 7/7] perf: reduce layers, add dockerfile, build from ., add entrypoint --- .dockerignore | 3 +++ Dockerfile | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..2634dbfa04 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +./tests +./docs +./.github diff --git a/Dockerfile b/Dockerfile index ed8c33ccc9..c2f26457e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ FROM ubuntu:20.04 -RUN apt-get update && apt-get upgrade --yes && apt-get install python3-pip python3.8 --yes -COPY . /ape -RUN python3 /ape/setup.py -RUN ape plugins add ens --yes -RUN ape plugins add etherscan --yes -RUN ape plugins add infura --yes +RUN apt-get update && apt-get upgrade --yes && apt-get install git python3.8 python3-pip --yes +COPY . . +RUN python3 ./setup.py install RUN ape plugins add solidity --yes RUN ape plugins add vyper --yes -ENTRYPOINT ["ape"] \ No newline at end of file +RUN ape plugins add infura --yes +RUN ape plugins add etherscan --yes +RUN ape plugins add ens --yes +ENTRYPOINT ["ape"]