Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile: update containerd binary to v2.0.0 #5463

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@
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 @@
&& 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=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
5 changes: 3 additions & 2 deletions util/testutil/workers/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,12 @@ func (c *Containerd) New(ctx context.Context, cfg *integration.BackendConfig) (b
deferF.Append(func() error { return os.RemoveAll(tmpdir) })

address := getContainerdSock(tmpdir)
config := fmt.Sprintf(`root = %q
config := fmt.Sprintf(`version = 2
root = %q
state = %q
# CRI plugins listens on 10010/tcp for stream server.
# We disable CRI plugin so that multiple instance can run simultaneously.
disabled_plugins = ["cri"]
disabled_plugins = ["io.containerd.grpc.v1.cri"]

[grpc]
address = %q
Expand Down
Loading