mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-25 02:04:31 +00:00
Note that this is not the latest (which was 95efd45db073 at time of writing) but the next commit 6428b4bad0c2 merges "Port ctr to use client package" breaks the use of `ctr run --runtime-config` (by removing that option). This contains https://github.com/containerd/containerd/pull/954 which was causing some services to fail to start. All previous uses of15541037b9are updated to5749f2e9e6. Signed-off-by: Ian Campbell <ian.campbell@docker.com>
48 lines
1.4 KiB
Docker
48 lines
1.4 KiB
Docker
FROM linuxkit/containerd:5749f2e9e65395cc6635229e8da0e0d484320ddf AS mirror
|
|
|
|
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
|
|
# removed openssl as I do not think server needs it
|
|
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
|
|
RUN apk add --no-cache --initdb -p /out \
|
|
alpine-baselayout \
|
|
btrfs-progs \
|
|
busybox \
|
|
ca-certificates \
|
|
curl \
|
|
e2fsprogs \
|
|
e2fsprogs-extra \
|
|
iptables \
|
|
musl \
|
|
xfsprogs \
|
|
xz
|
|
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
|
|
|
FROM scratch
|
|
COPY --from=mirror /out/ /
|
|
|
|
# set up Docker group
|
|
# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box
|
|
RUN set -x \
|
|
&& addgroup -S docker \
|
|
&& addgroup -S dockremap \
|
|
&& adduser -S -G dockremap dockremap \
|
|
&& echo 'dockremap:165536:65536' >> /etc/subuid \
|
|
&& echo 'dockremap:165536:65536' >> /etc/subgid
|
|
|
|
ENV DOCKER_BUCKET get.docker.com
|
|
ENV DOCKER_VERSION 17.05.0-ce
|
|
ENV DOCKER_SHA256 340e0b5a009ba70e1b644136b94d13824db0aeb52e09071410f35a95d94316d9
|
|
|
|
# we could avoid installing client here I suppose
|
|
RUN set -x \
|
|
&& curl -fSL "https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz" -o docker.tgz \
|
|
&& echo "${DOCKER_SHA256} *docker.tgz" | sha256sum -c - \
|
|
&& tar -xzvf docker.tgz \
|
|
&& mv docker/* /usr/bin/ \
|
|
&& rmdir docker \
|
|
&& rm docker.tgz \
|
|
&& docker -v
|
|
|
|
# use the Docker copy of tini as our init for zombie reaping
|
|
ENTRYPOINT ["/usr/bin/docker-init", "/usr/bin/dockerd"]
|