Skip to content

Commit 5882c72

Browse files
authored
Merge pull request #3422 from Shubhranshu153/prepare-1.7.x
Prepare 1.7.x
2 parents 845e989 + a803e60 commit 5882c72

File tree

89 files changed

+1290
-244
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+1290
-244
lines changed

.github/workflows/ghcr-image-build-and-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ env:
2323
jobs:
2424
build:
2525

26-
runs-on: ubuntu-22.04
26+
runs-on: ubuntu-24.04
2727
permissions:
2828
contents: read
2929
packages: write

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ env:
99
GO111MODULE: on
1010
jobs:
1111
release:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313
timeout-minutes: 40
1414
steps:
1515
- uses: actions/[email protected]
1616
- uses: actions/setup-go@v5
1717
with:
18-
go-version: 1.21.x
18+
go-version: 1.23.x
1919
- name: "Compile binaries"
2020
run: make artifacts
2121
- name: "SHA256SUMS"

.github/workflows/test.yml

Lines changed: 79 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ on:
88
pull_request:
99

1010
env:
11-
GO_VERSION: 1.21.x
11+
GO_VERSION: 1.23.x
1212

1313
jobs:
1414
project:
1515
name: Project Checks
16-
runs-on: ubuntu-22.04
16+
runs-on: ubuntu-24.04
1717
timeout-minutes: 20
1818
steps:
1919
- uses: actions/[email protected]
@@ -34,7 +34,7 @@ jobs:
3434
working-directory: src/github.com/containerd/nerdctl
3535

3636
lint:
37-
runs-on: ubuntu-22.04
37+
runs-on: ubuntu-24.04
3838
timeout-minutes: 20
3939
steps:
4040
- uses: actions/[email protected]
@@ -46,15 +46,15 @@ jobs:
4646
check-latest: true
4747
cache: true
4848
- name: golangci-lint
49-
uses: golangci/golangci-lint-action@v3.7.0
49+
uses: golangci/golangci-lint-action@v6.1.0
5050
with:
51-
version: v1.55.2
51+
version: v1.60.1
5252
args: --verbose
5353
- name: yamllint-lint
5454
run: yamllint .
5555

5656
test-unit:
57-
runs-on: ubuntu-22.04
57+
runs-on: ubuntu-24.04
5858
timeout-minutes: 20
5959
steps:
6060
- uses: actions/[email protected]
@@ -74,16 +74,20 @@ jobs:
7474
strategy:
7575
fail-fast: false
7676
matrix:
77-
# ubuntu-20.04: cgroup v1, ubuntu-22.04: cgroup v2
77+
# ubuntu-20.04: cgroup v1, ubuntu-22.04 and later: cgroup v2
7878
include:
7979
- ubuntu: 20.04
8080
containerd: v1.6.31
8181
- ubuntu: 20.04
82-
containerd: v1.7.16
82+
containerd: v1.7.22
8383
- ubuntu: 22.04
84-
containerd: v1.7.16
84+
containerd: v1.7.22
8585
- ubuntu: 22.04
8686
containerd: main
87+
- ubuntu: 24.04
88+
containerd: v1.7.22
89+
- ubuntu: 24.04
90+
containerd: main
8791
env:
8892
UBUNTU_VERSION: "${{ matrix.ubuntu }}"
8993
CONTAINERD_VERSION: "${{ matrix.containerd }}"
@@ -110,10 +114,10 @@ jobs:
110114
strategy:
111115
fail-fast: false
112116
matrix:
113-
# ubuntu-20.04: cgroup v1, ubuntu-22.04: cgroup v2
117+
# ubuntu-20.04: cgroup v1, ubuntu-22.04 and later: cgroup v2
114118
include:
115-
- ubuntu: 22.04
116-
containerd: v1.7.16
119+
- ubuntu: 24.04
120+
containerd: v1.7.22
117121
env:
118122
UBUNTU_VERSION: "${{ matrix.ubuntu }}"
119123
CONTAINERD_VERSION: "${{ matrix.containerd }}"
@@ -154,47 +158,78 @@ jobs:
154158
strategy:
155159
fail-fast: false
156160
matrix:
157-
# ubuntu-22.04: cgroup v1, ubuntu-22.04: cgroup v2
161+
# ubuntu-20.04: cgroup v1, ubuntu-22.04 and later: cgroup v2
158162
include:
159163
- ubuntu: 20.04
160164
containerd: v1.6.31
161165
rootlesskit: v1.1.1
162166
target: test-integration-rootless
163167
- ubuntu: 20.04
164-
containerd: v1.7.16
165-
rootlesskit: v2.0.2
168+
containerd: v1.7.22
169+
rootlesskit: v2.3.1
166170
target: test-integration-rootless
167171
- ubuntu: 22.04
168-
containerd: v1.7.16
172+
containerd: v1.7.22
169173
rootlesskit: v1.1.1
170174
target: test-integration-rootless
171175
- ubuntu: 22.04
172-
containerd: main
173-
rootlesskit: v2.0.2
176+
containerd: main # v2.0.0-rc.X
177+
rootlesskit: v2.3.1
178+
target: test-integration-rootless
179+
- ubuntu: 24.04
180+
containerd: v1.7.22
181+
rootlesskit: v1.1.1
182+
target: test-integration-rootless
183+
- ubuntu: 24.04
184+
containerd: main # v2.0.0-rc.X
185+
rootlesskit: v2.3.1
174186
target: test-integration-rootless
175187
- ubuntu: 20.04
176188
containerd: v1.6.31
177189
rootlesskit: v1.1.1
178190
target: test-integration-rootless-port-slirp4netns
179191
- ubuntu: 20.04
180-
containerd: v1.7.16
181-
rootlesskit: v2.0.2
192+
containerd: v1.7.22
193+
rootlesskit: v2.3.1
182194
target: test-integration-rootless-port-slirp4netns
183195
- ubuntu: 22.04
184-
containerd: v1.7.16
196+
containerd: v1.7.22
185197
rootlesskit: v1.1.1
186198
target: test-integration-rootless-port-slirp4netns
187199
- ubuntu: 22.04
188-
containerd: main
189-
rootlesskit: v2.0.2
200+
containerd: main # v2.0.0-rc.X
201+
rootlesskit: v2.3.1
202+
target: test-integration-rootless-port-slirp4netns
203+
- ubuntu: 24.04
204+
containerd: v1.7.22
205+
rootlesskit: v1.1.1
206+
target: test-integration-rootless-port-slirp4netns
207+
- ubuntu: 24.04
208+
containerd: main # v2.0.0-rc.X
209+
rootlesskit: v2.3.1
190210
target: test-integration-rootless-port-slirp4netns
191211
env:
192212
UBUNTU_VERSION: "${{ matrix.ubuntu }}"
193213
CONTAINERD_VERSION: "${{ matrix.containerd }}"
194214
ROOTLESSKIT_VERSION: "${{ matrix.rootlesskit }}"
195215
TEST_TARGET: "${{ matrix.target }}"
196216
steps:
197-
- uses: actions/[email protected]
217+
- name: "Set up AppArmor"
218+
if: matrix.ubuntu == '24.04'
219+
run: |
220+
cat <<EOT | sudo tee "/etc/apparmor.d/usr.local.bin.rootlesskit"
221+
abi <abi/4.0>,
222+
include <tunables/global>
223+
224+
/usr/local/bin/rootlesskit flags=(unconfined) {
225+
userns,
226+
227+
# Site-specific additions and overrides. See local/README for details.
228+
include if exists <local/usr.local.bin.rootlesskit>
229+
}
230+
EOT
231+
sudo systemctl restart apparmor.service
232+
- uses: actions/[email protected]
198233
with:
199234
fetch-depth: 1
200235
- name: "Register QEMU (tonistiigi/binfmt)"
@@ -205,11 +240,11 @@ jobs:
205240
run: docker run -t --rm --privileged -e WORKAROUND_ISSUE_622=1 ${TEST_TARGET}
206241

207242
cross:
208-
runs-on: ubuntu-22.04
243+
runs-on: ubuntu-24.04
209244
timeout-minutes: 40
210245
strategy:
211246
matrix:
212-
go-version: ["1.21.x", "1.22.x"]
247+
go-version: ["1.22.x", "1.23.x"]
213248
steps:
214249
- uses: actions/[email protected]
215250
with:
@@ -223,8 +258,8 @@ jobs:
223258
run: GO_VERSION="$(echo ${{ matrix.go-version }} | sed -e s/.x//)" make artifacts
224259

225260
test-integration-docker-compatibility:
226-
runs-on: ubuntu-22.04
227-
timeout-minutes: 30
261+
runs-on: ubuntu-22.04 # TODO: ubuntu-24.04
262+
timeout-minutes: 45
228263
steps:
229264
- uses: actions/[email protected]
230265
with:
@@ -234,15 +269,25 @@ jobs:
234269
go-version: ${{ env.GO_VERSION }}
235270
cache: true
236271
check-latest: true
237-
- name: "Enable BuildKit"
272+
- name: "Install Docker v24"
238273
run: |
239274
set -eux -o pipefail
275+
# Uninstall the preinstalled Docker
276+
sudo apt-get remove docker-* containerd.io
240277
# Enable BuildKit explicitly
241278
sudo apt-get install -y moreutils
242279
cat /etc/docker/daemon.json
243280
jq '.features.buildkit = true' </etc/docker/daemon.json | sudo sponge /etc/docker/daemon.json
244281
cat /etc/docker/daemon.json
245-
sudo systemctl restart docker
282+
# Download Docker packages
283+
curl -OSL https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/containerd.io_1.6.33-1_amd64.deb
284+
curl -OSL https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce_24.0.9-1~ubuntu.22.04~jammy_amd64.deb
285+
curl -OSL https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce-cli_24.0.9-1~ubuntu.22.04~jammy_amd64.deb
286+
curl -OSL https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-buildx-plugin_0.13.1-1~ubuntu.22.04~jammy_amd64.deb
287+
curl -OSL https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-compose-plugin_2.25.0-1~ubuntu.22.04~jammy_amd64.deb
288+
# Install Docker
289+
sudo apt-get install -y ./*.deb
290+
rm -f ./*.deb
246291
# Print docker info
247292
docker info
248293
docker version
@@ -276,25 +321,24 @@ jobs:
276321
- uses: actions/[email protected]
277322
with:
278323
repository: containerd/containerd
279-
ref: v1.7.16
324+
ref: v1.7.22
280325
path: containerd
281326
fetch-depth: 1
282327
- name: "Set up CNI"
283328
working-directory: containerd
284329
run: GOPATH=$(go env GOPATH) script/setup/install-cni-windows
285330
- name: "Set up containerd"
286331
env:
287-
ctrdVersion: 1.7.16
332+
ctrdVersion: 1.7.22
288333
run: powershell hack/configure-windows-ci.ps1
289334
# TODO: Run unit tests
290335
- name: "Run integration tests"
291336
run: go test -v ./cmd/...
292337

293338
test-integration-freebsd:
294339
name: FreeBSD
295-
# "Larger" runner is needed for nested virtualization
296-
# https://github.com/organizations/containerd/settings/actions/runners
297-
runs-on: ubuntu-latest-4-cores
340+
# ubuntu-24.04 lacks the vagrant package
341+
runs-on: ubuntu-22.04
298342
timeout-minutes: 20
299343

300344
steps:

Dockerfile

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,43 +18,43 @@
1818
# TODO: verify commit hash
1919

2020
# Basic deps
21-
ARG CONTAINERD_VERSION=v1.7.16
22-
ARG RUNC_VERSION=v1.1.12
23-
ARG CNI_PLUGINS_VERSION=v1.4.1
21+
ARG CONTAINERD_VERSION=v1.7.22
22+
ARG RUNC_VERSION=v1.1.14
23+
ARG CNI_PLUGINS_VERSION=v1.5.1
2424

2525
# Extra deps: Build
26-
ARG BUILDKIT_VERSION=v0.12.5
26+
ARG BUILDKIT_VERSION=v0.15.2
2727
# Extra deps: Lazy-pulling
2828
ARG STARGZ_SNAPSHOTTER_VERSION=v0.15.1
2929
# Extra deps: Encryption
30-
ARG IMGCRYPT_VERSION=v1.1.10
30+
ARG IMGCRYPT_VERSION=v1.1.11
3131
# Extra deps: Rootless
32-
ARG ROOTLESSKIT_VERSION=v2.0.2
33-
ARG SLIRP4NETNS_VERSION=v1.2.3
32+
ARG ROOTLESSKIT_VERSION=v2.3.1
33+
ARG SLIRP4NETNS_VERSION=v1.3.1
3434
# Extra deps: bypass4netns
35-
ARG BYPASS4NETNS_VERSION=v0.4.0
35+
ARG BYPASS4NETNS_VERSION=v0.4.1
3636
# Extra deps: FUSE-OverlayFS
3737
ARG FUSE_OVERLAYFS_VERSION=v1.13
3838
ARG CONTAINERD_FUSE_OVERLAYFS_VERSION=v1.0.8
3939
# Extra deps: IPFS
40-
ARG KUBO_VERSION=v0.27.0
40+
ARG KUBO_VERSION=v0.29.0
4141
# Extra deps: Init
4242
ARG TINI_VERSION=v0.19.0
4343
# Extra deps: Debug
4444
ARG BUILDG_VERSION=v0.4.1
4545

4646
# Test deps
47-
ARG GO_VERSION=1.21
48-
ARG UBUNTU_VERSION=22.04
47+
ARG GO_VERSION=1.23
48+
ARG UBUNTU_VERSION=24.04
4949
ARG CONTAINERIZED_SYSTEMD_VERSION=v0.1.1
50-
ARG GOTESTSUM_VERSION=v1.11.0
51-
ARG NYDUS_VERSION=v2.2.4
52-
ARG SOCI_SNAPSHOTTER_VERSION=0.4.0
50+
ARG GOTESTSUM_VERSION=v1.12.0
51+
ARG NYDUS_VERSION=v2.2.5
52+
ARG SOCI_SNAPSHOTTER_VERSION=0.7.0
5353

54-
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.3.0 AS xx
54+
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.5.0 AS xx
5555

5656

57-
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-bullseye AS build-base-debian
57+
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-bookworm AS build-base-debian
5858
COPY --from=xx / /
5959
ENV DEBIAN_FRONTEND=noninteractive
6060
RUN apt-get update && \
@@ -63,7 +63,7 @@ ARG TARGETARCH
6363
# libbtrfs: for containerd
6464
# libseccomp: for runc and bypass4netns
6565
RUN xx-apt-get update && \
66-
xx-apt-get install -y binutils gcc libc6-dev libbtrfs-dev libseccomp-dev
66+
xx-apt-get install -y binutils gcc libc6-dev libbtrfs-dev libseccomp-dev pkg-config
6767

6868
FROM build-base-debian AS build-containerd
6969
ARG TARGETARCH
@@ -323,7 +323,7 @@ RUN apt-get update && \
323323
apt-get install -qq -y \
324324
uidmap \
325325
openssh-server openssh-client
326-
# TODO: update containerized-systemd to enable sshd by default, or allow `systemctl wants <TARGET> sshd` here
326+
# TODO: update containerized-systemd to enable sshd by default, or allow `systemctl wants <TARGET> ssh` here
327327
RUN ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N '' && \
328328
useradd -m -s /bin/bash rootless && \
329329
mkdir -p -m 0700 /home/rootless/.ssh && \
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
59279df5853bef19a03ec15c5c31b772e59d91d079ab0221e1bafa023cf41c35 buildkit-v0.15.2.linux-amd64.tar.gz
2+
15329adaa5e5b2bea0580f3e5e33765f84504075710bb791e362c3b160ca7e61 buildkit-v0.15.2.linux-arm64.tar.gz
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
77baa2f669980a82255ffa2f2717de823992480271ee778aa51a9c60ae89ff9b cni-plugins-linux-amd64-v1.5.1.tgz
2+
c2a292714d0fad98a3491ae43df8ad58354b3c0bdf5d5a3e281777967c70fcff cni-plugins-linux-arm64-v1.5.1.tgz
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
57bc67f71b8043961417325be13528d4f1e8ec90876cd34c38064431f457070f rootlesskit-aarch64.tar.gz
2+
5154542509736957738478e3624b53865a875c396f978db5adea513d7507dee6 rootlesskit-armv7l.tar.gz
3+
983642556dd3dcbe2c9b764d577882016ad1ca960815ffa13ca76d7da518504f rootlesskit-ppc64le.tar.gz
4+
83c40bb8938828eb15837a4900ba825a1f52227631195c22df85f2e8f7f73546 rootlesskit-riscv64.tar.gz
5+
dd6c8bc7e1c9b5d8c775efcf40854ef1d25205060294f0654a77d996a7f4e172 rootlesskit-s390x.tar.gz
6+
caafdce18e0959f078b4b478d4f352ebf3d556e373265fc7831f1a6d70219ee0 rootlesskit-x86_64.tar.gz
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2dd9aac6c2e3203e53cb7b6e4b9fc7123e4e4a9716c8bb1d95951853059a6af5 slirp4netns-aarch64
2+
ed618c0f2c74014bb736e9e427e18c8791ad9d68311872a41b06fac0d7cb9ef2 slirp4netns-armv7l
3+
a10f70209cee0dd0532fea0e8b6bfde5d16dec5206fd4b3387d861721456de66 slirp4netns-ppc64le
4+
38209015c2f3f4619d9fc46610852887910f33c7a0b96f7d2aa835a7bbc73f31 slirp4netns-riscv64
5+
9f42718455b1f9cf4b6f0efee314b78e860b8c36dbbb6290f09c8fbedda9ff8a slirp4netns-s390x
6+
4bc5d6c311f9fa7ae00ce54aefe10c2afaf0800fe9e99f32616a964ed804a9e1 slirp4netns-x86_64

Dockerfile.d/test-integration-rootless.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if [[ "$(id -u)" = "0" ]]; then
2727
fi
2828

2929
# Switch to the rootless user via SSH
30-
systemctl start sshd
30+
systemctl start ssh
3131
exec ssh -o StrictHostKeyChecking=no rootless@localhost "$0" "$@"
3232
else
3333
containerd-rootless-setuptool.sh install
@@ -48,7 +48,7 @@ else
4848
[proxy_plugins]
4949
[proxy_plugins."stargz"]
5050
type = "snapshot"
51-
address = "/run/user/1000/containerd-stargz-grpc/containerd-stargz-grpc.sock"
51+
address = "/run/user/$(id -u)/containerd-stargz-grpc/containerd-stargz-grpc.sock"
5252
EOF
5353
systemctl --user restart containerd.service
5454
containerd-rootless-setuptool.sh -- install-ipfs --init --offline # offline ipfs daemon for testing

0 commit comments

Comments
 (0)