kubernetes: use copy --from=image-ref

I hadn't realised this was possible, it means we don't need the dummy `FROM ...
AS docker`.

Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
Ian Campbell 2017-10-09 09:57:07 +01:00
parent 7f8082b253
commit 26d93d613c

View File

@ -1,7 +1,3 @@
FROM docker:17.06.0-ce AS docker
# Nothing to do in here, just for COPY --from=docker below
FROM linuxkit/alpine:ad35b6ddbc70faa07e59a9d7dee7707c08122e8d AS build
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
@ -17,7 +13,7 @@ RUN rmdir /out/var/run && ln -nfs /run /out/var/run
FROM scratch
WORKDIR /
COPY --from=build /out /
COPY --from=docker /usr/local/bin/docker /usr/local/bin/docker
COPY --from=docker:17.06.0-ce /usr/local/bin/docker /usr/local/bin/docker
COPY *.tar /images/
ENTRYPOINT [ "/bin/sh", "-c" ]
CMD [ "for image in /images/*.tar ; do docker image load -i $image && rm -f $image ; done" ]