From 48bf88c40e2f408432f31c086497712dd1804bf0 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 23 Feb 2020 01:09:59 +0100 Subject: [PATCH] Dockerfile: prevent busting build-cache for busybox rootfs Move adding the source code to the end, so that the busybox rootfs doesn't have to be fetched again on each code change. Signed-off-by: Sebastiaan van Stijn --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2c8fa7f8a..9c12b26cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -65,15 +65,15 @@ RUN mkdir -p /usr/src/criu \ && make install-criu \ && rm -rf /usr/src/criu -# setup a playground for us to spawn containers in -ENV ROOTFS /busybox -RUN mkdir -p ${ROOTFS} - COPY script/tmpmount / WORKDIR /go/src/github.com/opencontainers/runc ENTRYPOINT ["/tmpmount"] -ADD . /go/src/github.com/opencontainers/runc - +# setup a playground for us to spawn containers in +COPY tests/integration/multi-arch.bash tests/integration/ +ENV ROOTFS /busybox +RUN mkdir -p "${ROOTFS}" RUN . tests/integration/multi-arch.bash \ - && curl -fsSL `get_busybox` | tar xfJC - ${ROOTFS} + && curl -fsSL `get_busybox` | tar xfJC - "${ROOTFS}" + +COPY . .