Skip to content

Commit 7147463

Browse files
committed
dockerfile: update docker to 24.0.2
Signed-off-by: CrazyMax <[email protected]>
1 parent 010e4c8 commit 7147463

1 file changed

Lines changed: 31 additions & 5 deletions

File tree

Dockerfile

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
ARG GO_VERSION=1.20
44
ARG XX_VERSION=1.2.1
5-
ARG DOCKERD_VERSION=20.10.14
5+
6+
ARG DOCKER_VERSION=24.0.2
67
ARG GOTESTSUM_VERSION=v1.9.0
78
ARG REGISTRY_VERSION=2.8.0
89
ARG BUILDKIT_VERSION=v0.11.6
910

10-
FROM docker:$DOCKERD_VERSION AS dockerd-release
11-
1211
# xx is a helper for cross-compilation
1312
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
1413

@@ -25,6 +24,22 @@ FROM registry:$REGISTRY_VERSION AS registry
2524

2625
FROM moby/buildkit:$BUILDKIT_VERSION AS buildkit
2726

27+
FROM gobase AS docker
28+
ARG TARGETPLATFORM
29+
ARG DOCKER_VERSION
30+
WORKDIR /opt/docker
31+
RUN DOCKER_ARCH=$(case ${TARGETPLATFORM:-linux/amd64} in \
32+
"linux/amd64") echo "x86_64" ;; \
33+
"linux/arm/v6") echo "armel" ;; \
34+
"linux/arm/v7") echo "armhf" ;; \
35+
"linux/arm64") echo "aarch64" ;; \
36+
"linux/ppc64le") echo "ppc64le" ;; \
37+
"linux/s390x") echo "s390x" ;; \
38+
*) echo "" ;; esac) \
39+
&& echo "DOCKER_ARCH=$DOCKER_ARCH" \
40+
&& wget -qO- "https://download.docker.com/linux/static/stable/${DOCKER_ARCH}/docker-${DOCKER_VERSION}.tgz" | tar xvz --strip 1
41+
RUN ./dockerd --version && ./containerd --version && ./ctr --version && ./runc --version
42+
2843
FROM gobase AS gotestsum
2944
ARG GOTESTSUM_VERSION
3045
ENV GOFLAGS=
@@ -77,9 +92,20 @@ FROM binaries-$TARGETOS AS binaries
7792
ARG BUILDKIT_SBOM_SCAN_STAGE=true
7893

7994
FROM gobase AS integration-test-base
80-
RUN apk add --no-cache docker runc containerd
95+
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
96+
RUN apk add --no-cache \
97+
btrfs-progs \
98+
e2fsprogs \
99+
e2fsprogs-extra \
100+
ip6tables \
101+
iptables \
102+
openssl \
103+
shadow-uidmap \
104+
xfsprogs \
105+
xz
81106
COPY --link --from=gotestsum /out/gotestsum /usr/bin/
82107
COPY --link --from=registry /bin/registry /usr/bin/
108+
COPY --link --from=docker /opt/docker/* /usr/bin/
83109
COPY --link --from=buildkit /usr/bin/buildkitd /usr/bin/
84110
COPY --link --from=buildkit /usr/bin/buildctl /usr/bin/
85111
COPY --link --from=binaries /buildx /usr/bin/
@@ -102,7 +128,7 @@ FROM scratch AS release
102128
COPY --from=releaser /out/ /
103129

104130
# Shell
105-
FROM docker:$DOCKERD_VERSION AS dockerd-release
131+
FROM docker:$DOCKER_VERSION AS dockerd-release
106132
FROM alpine AS shell
107133
RUN apk add --no-cache iptables tmux git vim less openssh
108134
RUN mkdir -p /usr/local/lib/docker/cli-plugins && ln -s /usr/local/bin/buildx /usr/local/lib/docker/cli-plugins/docker-buildx

0 commit comments

Comments
 (0)