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.
@@ -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 . .
