From b6c9d0f933002f327c05474f95767bafa8fa44fb Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 18 Jul 2019 20:31:08 +0200 Subject: [PATCH] Use multi-stage docker builds Decreases size and amount of layers. --- .circleci/docker/Dockerfile.ubuntu1904 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.circleci/docker/Dockerfile.ubuntu1904 b/.circleci/docker/Dockerfile.ubuntu1904 index 5c36fc549..7fd8a4c8e 100644 --- a/.circleci/docker/Dockerfile.ubuntu1904 +++ b/.circleci/docker/Dockerfile.ubuntu1904 @@ -21,7 +21,7 @@ # # (c) 2016-2019 solidity contributors. #------------------------------------------------------------------------------ -FROM buildpack-deps:disco +FROM buildpack-deps:disco AS base ARG DEBIAN_FRONTEND=noninteractive @@ -41,6 +41,8 @@ RUN set -ex; \ pip install codecov; \ rm -rf /var/lib/apt/lists/* +FROM base AS libraries + # Aleth for end-to-end tests ARG ALETH_VERSION="1.6.0" ARG ALETH_HASH="7f7004e1563299bc57882e32b32e4a195747dfb6" @@ -115,7 +117,7 @@ RUN set -ex; \ # EVMONE RUN set -ex; \ cd /usr/src; \ - git clone --branch="v0.1.0" --recurse-submodules https://github.com/chfast/evmone.git; \ + git clone --branch="v0.1.0" --recurse-submodules https://github.com/ethereum/evmone.git; \ cd evmone; \ mkdir build; \ cd build; \ @@ -124,3 +126,7 @@ RUN set -ex; \ ninja install/strip; \ rm -rf /usr/src/evmone +FROM base +COPY --from=libraries /usr/lib /usr/lib +COPY --from=libraries /usr/bin /usr/bin +COPY --from=libraries /usr/include /usr/include