Skip to content

Commit

Permalink
Dockerfile: update containerd binary to v2.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed Nov 6, 2024
1 parent fdae411 commit 555b636
Showing 1 changed file with 27 additions and 28 deletions.
55 changes: 27 additions & 28 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# syntax=docker/dockerfile-upstream:master

ARG RUNC_VERSION=v1.2.1
ARG CONTAINERD_VERSION=v1.7.23
# CONTAINERD_ALT_VERSION_16 defines fallback containerd version for integration tests
ARG CONTAINERD_VERSION=v2.0.0
# CONTAINERD_ALT_VERSION_... defines fallback containerd version for integration tests
ARG CONTAINERD_ALT_VERSION_17=v1.7.23
ARG CONTAINERD_ALT_VERSION_16=v1.6.36
ARG REGISTRY_VERSION=v2.8.3
ARG ROOTLESSKIT_VERSION=v2.3.1
Expand Down Expand Up @@ -206,14 +207,12 @@ RUN apk add --no-cache fuse3 git openssh pigz xz iptables ip6tables \
COPY --link examples/buildctl-daemonless/buildctl-daemonless.sh /usr/bin/
VOLUME /var/lib/buildkit

FROM gobuild-base AS containerd
FROM gobuild-base AS containerd-build
WORKDIR /go/src/github.com/containerd/containerd
ARG CONTAINERD_VERSION
ADD --keep-git-dir=true "https://github.com/containerd/containerd.git#$CONTAINERD_VERSION" .
ARG TARGETPLATFORM
ENV CGO_ENABLED=1 BUILDTAGS=no_btrfs GO111MODULE=off
RUN xx-apk add musl-dev gcc && xx-go --wrap
RUN --mount=target=/root/.cache,type=cache <<EOT
COPY --chmod=755 <<EOT /build.sh

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (freebsd/amd64)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / prepare

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / prepare

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-rootless-slirp4netns-detachnetns, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-1.6, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-rootless, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-rootless, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-snapshotter-stargz, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-snapshotter-stargz, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-rootless-slirp4netns-detachnetns, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-snapshotter-stargz, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-rootless, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-1.6, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-rootless, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-snapshotter-stargz, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (./..., 1, integration gateway)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (./..., nydus, 1, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (./client, oci, nydus, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-snapshotter-stargz, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, int...

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-rootless-slirp4netns-detachnetns, ./client ./cmd/buildctl ./worker/containerd ./solver ....

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-rootless, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-1.6, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (./client, containerd, nydus, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-rootless, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integr...

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 215 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-snapshotter-stargz, ./client ./cmd/buildctl ./worker/containerd ./solver ./fronte...

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ext' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
set -ex
mkdir /out
ext=""
Expand All @@ -226,34 +225,33 @@ RUN --mount=target=/root/.cache,type=cache <<EOT
mv bin/containerd bin/containerd-shim* /out
else
CGO_ENABLED=0 make STATIC=1 binaries
mv bin/containerd${ext} bin/containerd-shim* /out
mv bin/containerd${ext} /out
# No shim binary is built for FreeBSD, since containerd v2.0.
if ls bin/containerd-shim* >/dev/null 2>&1; then
mv bin/containerd-shim* /out
fi
fi
EOT

FROM containerd-build AS containerd
WORKDIR /go/src/github.com/containerd/containerd
ARG CONTAINERD_VERSION
ADD --keep-git-dir=true "https://github.com/containerd/containerd.git#$CONTAINERD_VERSION" .
RUN /build.sh

# containerd-alt-17 builds containerd v1.7 for integration tests
FROM containerd-build AS containerd-alt-17
WORKDIR /go/src/github.com/containerd/containerd
ARG CONTAINERD_ALT_VERSION_16
ADD --keep-git-dir=true "https://github.com/containerd/containerd.git#$CONTAINERD_ALT_VERSION_17" .

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / prepare

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / prepare

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-rootless-slirp4netns-detachnetns, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-1.6, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-rootless, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-rootless, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-snapshotter-stargz, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-snapshotter-stargz, ./frontend/dockerfile, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-rootless-slirp4netns-detachnetns, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-snapshotter-stargz, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-rootless, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-1.6, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-rootless, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-snapshotter-stargz, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (./..., 1, integration gateway)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd, ./frontend/dockerfile, dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (./..., nydus, 1, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (./client, oci, nydus, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-snapshotter-stargz, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, int...

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-rootless-slirp4netns-detachnetns, ./client ./cmd/buildctl ./worker/containerd ./solver ....

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (oci-rootless, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-1.6, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (./client, containerd, nydus, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-rootless, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integr...

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 246 in Dockerfile

View workflow job for this annotation

GitHub Actions / test / run (containerd-snapshotter-stargz, ./client ./cmd/buildctl ./worker/containerd ./solver ./fronte...

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CONTAINERD_ALT_VERSION_17' (did you mean $CONTAINERD_ALT_VERSION_16?) More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
RUN /build.sh

# containerd-alt-16 builds containerd v1.6 for integration tests
FROM gobuild-base AS containerd-alt-16
FROM containerd-build AS containerd-alt-16
WORKDIR /go/src/github.com/containerd/containerd
ARG CONTAINERD_ALT_VERSION_16
ADD --keep-git-dir=true "https://github.com/containerd/containerd.git#$CONTAINERD_ALT_VERSION_16" .
ARG TARGETPLATFORM
ENV CGO_ENABLED=1 BUILDTAGS=no_btrfs GO111MODULE=off
RUN xx-apk add musl-dev gcc && xx-go --wrap
RUN --mount=target=/root/.cache,type=cache <<EOT
set -ex
mkdir /out
ext=""
if [ "$(xx-info os)" = "windows" ]; then
ext=".exe"
fi
if [ "$(xx-info os)" = "linux" ]; then
make bin/containerd
make bin/containerd-shim-runc-v2
mv bin/containerd bin/containerd-shim* /out
else
CGO_ENABLED=0 make STATIC=1 binaries
mv bin/containerd${ext} bin/containerd-shim* /out
fi
EOT
RUN /build.sh

FROM gobuild-base AS registry
WORKDIR /go/src/github.com/docker/distribution
Expand Down Expand Up @@ -390,7 +388,7 @@ RUN curl -Ls https://raw.githubusercontent.com/moby/moby/v25.0.1/hack/dind > /do
&& chmod 0755 /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
# musl is needed to directly use the registry binary that is built on alpine
ENV BUILDKIT_INTEGRATION_CONTAINERD_EXTRA="containerd-1.6=/opt/containerd-alt-16/bin"
ENV BUILDKIT_INTEGRATION_CONTAINERD_EXTRA="containerd-1.7=/opt/containerd-alt-17/bin,containerd-1.6=/opt/containerd-alt-16/bin"
ENV BUILDKIT_INTEGRATION_SNAPSHOTTER=stargz
ENV BUILDKIT_SETUP_CGROUPV2_ROOT=1
ENV CGO_ENABLED=0
Expand All @@ -401,6 +399,7 @@ COPY --link --from=minio-mc /usr/bin/mc /usr/bin/
COPY --link --from=nydus /out/nydus-static/* /usr/bin/
COPY --link --from=stargz-snapshotter /out/* /usr/bin/
COPY --link --from=rootlesskit /rootlesskit /usr/bin/
COPY --link --from=containerd-alt-17 /out/containerd* /opt/containerd-alt-17/bin/
COPY --link --from=containerd-alt-16 /out/containerd* /opt/containerd-alt-16/bin/
COPY --link --from=registry /out /usr/bin/
COPY --link --from=runc /usr/bin/runc /usr/bin/
Expand Down

0 comments on commit 555b636

Please sign in to comment.