Files
linuxkit/projects/kubernetes/image-cache/Dockerfile
Ian Campbell 27d96c2f99 kubernetes: just use the docker images as a base
Since we just want the client we don't need dind.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-19 10:57:50 +01:00

23 lines
750 B
Docker

FROM docker:17.06.0-ce AS docker
# Nothing to do in here, just for COPY --from=docker below
FROM linuxkit/alpine:9bcf61f605ef0ce36cc94d59b8eac307862de6e1 AS build
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \
alpine-baselayout \
busybox
# Remove apk residuals. We have a read-only rootfs, so apk is of no use.
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
FROM scratch
WORKDIR /
COPY --from=build /out /
COPY --from=docker /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" ]
LABEL org.mobyproject.config='{"binds": ["/var/run:/var/run"]}'