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 <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2020-02-23 01:09:59 +01:00
parent a596387689
commit 48bf88c40e
+7 -7
View File
@@ -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 . .