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

Prepare 1.7.x #3422

Merged
merged 30 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
209c320
build(deps): bump github.com/containerd/accelerated-container-image
dependabot[bot] Apr 8, 2024
80762fb
update Dockerfile go version to 1.22 to support containerd v2 builds
Shubhranshu153 Sep 8, 2024
5c27256
update CNI plugins (1.5.1)
AkihiroSuda Jun 20, 2024
a437e4b
chore: update runc to v1.1.14
pendo324 Sep 3, 2024
f3a1869
fix: Test create with mac address after updating cni version
Shubhranshu153 Sep 8, 2024
4f68270
feat: support for --sig-proxy in run
CodeChanning Jun 12, 2024
96bf9ea
feat: support for -a and --attach in run
CodeChanning Jun 17, 2024
2b61e68
feat: add Status and ID as event attributes
CodeChanning Jul 3, 2024
d97ca7d
feat: adding filter infrastructure + status and event filter
CodeChanning Jul 3, 2024
48824a7
Include init NetworkSettings within inspect response
chews93319 Aug 16, 2024
a8a63b9
fix: Update Test for CNI plugin upgrade
Shubhranshu153 Sep 8, 2024
4f8a66f
fix: Anchor Docer Version to v24 and update dependencies
Shubhranshu153 Sep 8, 2024
22c59a0
update BuildKit (0.15.2)
AkihiroSuda Aug 17, 2024
002b037
update imgcrypt (1.1.11)
yankay Jun 3, 2024
ce82888
update slirp4netns (1.3.1)
AkihiroSuda May 27, 2024
5012ba8
update RootlessKit (2.3.1)
AkihiroSuda Aug 17, 2024
d4fdd9b
update bypass4netns (0.4.1)
AkihiroSuda Apr 8, 2024
149f87c
update Kubo (0.29.0)
AkihiroSuda Jun 20, 2024
47164ce
update Go (1.23)
AkihiroSuda Aug 17, 2024
553d52b
CI: update Ubuntu (24.04)
AkihiroSuda Jun 20, 2024
658a95b
Update go mod and go sum
Shubhranshu153 Sep 8, 2024
d447f54
update Nydus (2.2.5)
AkihiroSuda Jun 20, 2024
3e7af3b
update soci-snapshotter (0.7.0)
AkihiroSuda Aug 17, 2024
e974cc5
build(deps): bump tonistiigi/xx from 1.4.0 to 1.5.0
dependabot[bot] Aug 20, 2024
4451ac1
update debian (12)
AkihiroSuda Jun 20, 2024
1d46b4b
Add ubuntu 22.04 test to the matrix
Shubhranshu153 Sep 8, 2024
2df0c94
Update golangci-lint version and go mod cleanup
Shubhranshu153 Sep 8, 2024
02d73cc
Fix S1009 (see https://staticcheck.dev/docs/checks#S1009)
apostasie Aug 17, 2024
7cab42c
Update deprecated packages
Shubhranshu153 Sep 9, 2024
a803e60
Update containerd version to 1.7.22
Shubhranshu153 Sep 10, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/ghcr-image-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ env:
jobs:
build:

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ env:
GO111MODULE: on
jobs:
release:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 40
steps:
- uses: actions/[email protected]
- uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.23.x
- name: "Compile binaries"
run: make artifacts
- name: "SHA256SUMS"
Expand Down
110 changes: 77 additions & 33 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
pull_request:

env:
GO_VERSION: 1.21.x
GO_VERSION: 1.23.x

jobs:
project:
name: Project Checks
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/[email protected]
Expand All @@ -34,7 +34,7 @@ jobs:
working-directory: src/github.com/containerd/nerdctl

lint:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/[email protected]
Expand All @@ -54,7 +54,7 @@ jobs:
run: yamllint .

test-unit:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/[email protected]
Expand All @@ -74,16 +74,20 @@ jobs:
strategy:
fail-fast: false
matrix:
# ubuntu-20.04: cgroup v1, ubuntu-22.04: cgroup v2
# ubuntu-20.04: cgroup v1, ubuntu-22.04 and later: cgroup v2
include:
- ubuntu: 20.04
containerd: v1.6.31
- ubuntu: 20.04
containerd: v1.7.16
containerd: v1.7.21
Shubhranshu153 marked this conversation as resolved.
Show resolved Hide resolved
- ubuntu: 22.04
containerd: v1.7.16
containerd: v1.7.21
- ubuntu: 22.04
containerd: main
- ubuntu: 24.04
containerd: v1.7.21
- ubuntu: 24.04
containerd: main
env:
UBUNTU_VERSION: "${{ matrix.ubuntu }}"
CONTAINERD_VERSION: "${{ matrix.containerd }}"
Expand All @@ -110,10 +114,10 @@ jobs:
strategy:
fail-fast: false
matrix:
# ubuntu-20.04: cgroup v1, ubuntu-22.04: cgroup v2
# ubuntu-20.04: cgroup v1, ubuntu-22.04 and later: cgroup v2
include:
- ubuntu: 22.04
containerd: v1.7.16
- ubuntu: 24.04
containerd: v1.7.21
env:
UBUNTU_VERSION: "${{ matrix.ubuntu }}"
CONTAINERD_VERSION: "${{ matrix.containerd }}"
Expand Down Expand Up @@ -154,47 +158,78 @@ jobs:
strategy:
fail-fast: false
matrix:
# ubuntu-22.04: cgroup v1, ubuntu-22.04: cgroup v2
# ubuntu-20.04: cgroup v1, ubuntu-22.04 and later: cgroup v2
include:
- ubuntu: 20.04
containerd: v1.6.31
rootlesskit: v1.1.1
target: test-integration-rootless
- ubuntu: 20.04
containerd: v1.7.16
rootlesskit: v2.0.2
containerd: v1.7.21
rootlesskit: v2.3.1
target: test-integration-rootless
- ubuntu: 22.04
containerd: v1.7.16
containerd: v1.7.21
rootlesskit: v1.1.1
target: test-integration-rootless
- ubuntu: 22.04
containerd: main
rootlesskit: v2.0.2
containerd: main # v2.0.0-rc.X
rootlesskit: v2.3.1
target: test-integration-rootless
- ubuntu: 24.04
containerd: v1.7.21
rootlesskit: v1.1.1
target: test-integration-rootless
- ubuntu: 24.04
containerd: main # v2.0.0-rc.X
rootlesskit: v2.3.1
target: test-integration-rootless
- ubuntu: 20.04
containerd: v1.6.31
rootlesskit: v1.1.1
target: test-integration-rootless-port-slirp4netns
- ubuntu: 20.04
containerd: v1.7.16
rootlesskit: v2.0.2
containerd: v1.7.21
rootlesskit: v2.3.1
target: test-integration-rootless-port-slirp4netns
- ubuntu: 22.04
containerd: v1.7.16
containerd: v1.7.21
rootlesskit: v1.1.1
target: test-integration-rootless-port-slirp4netns
- ubuntu: 22.04
containerd: main
rootlesskit: v2.0.2
containerd: main # v2.0.0-rc.X
rootlesskit: v2.3.1
target: test-integration-rootless-port-slirp4netns
- ubuntu: 24.04
containerd: v1.7.21
rootlesskit: v1.1.1
target: test-integration-rootless-port-slirp4netns
- ubuntu: 24.04
containerd: main # v2.0.0-rc.X
rootlesskit: v2.3.1
target: test-integration-rootless-port-slirp4netns
env:
UBUNTU_VERSION: "${{ matrix.ubuntu }}"
CONTAINERD_VERSION: "${{ matrix.containerd }}"
ROOTLESSKIT_VERSION: "${{ matrix.rootlesskit }}"
TEST_TARGET: "${{ matrix.target }}"
steps:
- uses: actions/[email protected]
- name: "Set up AppArmor"
if: matrix.ubuntu == '24.04'
run: |
cat <<EOT | sudo tee "/etc/apparmor.d/usr.local.bin.rootlesskit"
abi <abi/4.0>,
include <tunables/global>

/usr/local/bin/rootlesskit flags=(unconfined) {
userns,

# Site-specific additions and overrides. See local/README for details.
include if exists <local/usr.local.bin.rootlesskit>
}
EOT
sudo systemctl restart apparmor.service
- uses: actions/[email protected]
with:
fetch-depth: 1
- name: "Register QEMU (tonistiigi/binfmt)"
Expand All @@ -205,11 +240,11 @@ jobs:
run: docker run -t --rm --privileged -e WORKAROUND_ISSUE_622=1 ${TEST_TARGET}

cross:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 40
strategy:
matrix:
go-version: ["1.21.x", "1.22.x"]
go-version: ["1.22.x", "1.23.x"]
steps:
- uses: actions/[email protected]
with:
Expand All @@ -223,8 +258,8 @@ jobs:
run: GO_VERSION="$(echo ${{ matrix.go-version }} | sed -e s/.x//)" make artifacts

test-integration-docker-compatibility:
runs-on: ubuntu-22.04
timeout-minutes: 30
runs-on: ubuntu-22.04 # TODO: ubuntu-24.04
timeout-minutes: 45
steps:
- uses: actions/[email protected]
with:
Expand All @@ -234,15 +269,25 @@ jobs:
go-version: ${{ env.GO_VERSION }}
cache: true
check-latest: true
- name: "Enable BuildKit"
- name: "Install Docker v24"
run: |
set -eux -o pipefail
# Uninstall the preinstalled Docker
sudo apt-get remove docker-* containerd.io
# Enable BuildKit explicitly
sudo apt-get install -y moreutils
cat /etc/docker/daemon.json
jq '.features.buildkit = true' </etc/docker/daemon.json | sudo sponge /etc/docker/daemon.json
cat /etc/docker/daemon.json
sudo systemctl restart docker
# Download Docker packages
curl -OSL https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/containerd.io_1.6.33-1_amd64.deb
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
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
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
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
# Install Docker
sudo apt-get install -y ./*.deb
rm -f ./*.deb
# Print docker info
docker info
docker version
Expand Down Expand Up @@ -276,25 +321,24 @@ jobs:
- uses: actions/[email protected]
with:
repository: containerd/containerd
ref: v1.7.16
ref: v1.7.21
path: containerd
fetch-depth: 1
- name: "Set up CNI"
working-directory: containerd
run: GOPATH=$(go env GOPATH) script/setup/install-cni-windows
- name: "Set up containerd"
env:
ctrdVersion: 1.7.16
ctrdVersion: 1.7.21
run: powershell hack/configure-windows-ci.ps1
# TODO: Run unit tests
- name: "Run integration tests"
run: go test -v ./cmd/...

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

steps:
Expand Down
36 changes: 18 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,43 @@
# TODO: verify commit hash

# Basic deps
ARG CONTAINERD_VERSION=v1.7.16
ARG RUNC_VERSION=v1.1.12
ARG CNI_PLUGINS_VERSION=v1.4.1
ARG CONTAINERD_VERSION=v1.7.21
ARG RUNC_VERSION=v1.1.14
ARG CNI_PLUGINS_VERSION=v1.5.1

# Extra deps: Build
ARG BUILDKIT_VERSION=v0.12.5
ARG BUILDKIT_VERSION=v0.15.2
# Extra deps: Lazy-pulling
ARG STARGZ_SNAPSHOTTER_VERSION=v0.15.1
# Extra deps: Encryption
ARG IMGCRYPT_VERSION=v1.1.10
ARG IMGCRYPT_VERSION=v1.1.11
# Extra deps: Rootless
ARG ROOTLESSKIT_VERSION=v2.0.2
ARG SLIRP4NETNS_VERSION=v1.2.3
ARG ROOTLESSKIT_VERSION=v2.3.1
ARG SLIRP4NETNS_VERSION=v1.3.1
# Extra deps: bypass4netns
ARG BYPASS4NETNS_VERSION=v0.4.0
ARG BYPASS4NETNS_VERSION=v0.4.1
# Extra deps: FUSE-OverlayFS
ARG FUSE_OVERLAYFS_VERSION=v1.13
ARG CONTAINERD_FUSE_OVERLAYFS_VERSION=v1.0.8
# Extra deps: IPFS
ARG KUBO_VERSION=v0.27.0
ARG KUBO_VERSION=v0.29.0
# Extra deps: Init
ARG TINI_VERSION=v0.19.0
# Extra deps: Debug
ARG BUILDG_VERSION=v0.4.1

# Test deps
ARG GO_VERSION=1.21
ARG UBUNTU_VERSION=22.04
ARG GO_VERSION=1.23
ARG UBUNTU_VERSION=24.04
ARG CONTAINERIZED_SYSTEMD_VERSION=v0.1.1
ARG GOTESTSUM_VERSION=v1.11.0
ARG NYDUS_VERSION=v2.2.4
ARG SOCI_SNAPSHOTTER_VERSION=0.4.0
ARG GOTESTSUM_VERSION=v1.12.0
ARG NYDUS_VERSION=v2.2.5
ARG SOCI_SNAPSHOTTER_VERSION=0.7.0

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


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

FROM build-base-debian AS build-containerd
ARG TARGETARCH
Expand Down Expand Up @@ -323,7 +323,7 @@ RUN apt-get update && \
apt-get install -qq -y \
uidmap \
openssh-server openssh-client
# TODO: update containerized-systemd to enable sshd by default, or allow `systemctl wants <TARGET> sshd` here
# TODO: update containerized-systemd to enable sshd by default, or allow `systemctl wants <TARGET> ssh` here
RUN ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N '' && \
useradd -m -s /bin/bash rootless && \
mkdir -p -m 0700 /home/rootless/.ssh && \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.d/SHA256SUMS.d/buildkit-v0.15.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
59279df5853bef19a03ec15c5c31b772e59d91d079ab0221e1bafa023cf41c35 buildkit-v0.15.2.linux-amd64.tar.gz
15329adaa5e5b2bea0580f3e5e33765f84504075710bb791e362c3b160ca7e61 buildkit-v0.15.2.linux-arm64.tar.gz
2 changes: 2 additions & 0 deletions Dockerfile.d/SHA256SUMS.d/cni-plugins-v1.5.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
77baa2f669980a82255ffa2f2717de823992480271ee778aa51a9c60ae89ff9b cni-plugins-linux-amd64-v1.5.1.tgz
c2a292714d0fad98a3491ae43df8ad58354b3c0bdf5d5a3e281777967c70fcff cni-plugins-linux-arm64-v1.5.1.tgz
6 changes: 6 additions & 0 deletions Dockerfile.d/SHA256SUMS.d/rootlesskit-v2.3.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
57bc67f71b8043961417325be13528d4f1e8ec90876cd34c38064431f457070f rootlesskit-aarch64.tar.gz
5154542509736957738478e3624b53865a875c396f978db5adea513d7507dee6 rootlesskit-armv7l.tar.gz
983642556dd3dcbe2c9b764d577882016ad1ca960815ffa13ca76d7da518504f rootlesskit-ppc64le.tar.gz
83c40bb8938828eb15837a4900ba825a1f52227631195c22df85f2e8f7f73546 rootlesskit-riscv64.tar.gz
dd6c8bc7e1c9b5d8c775efcf40854ef1d25205060294f0654a77d996a7f4e172 rootlesskit-s390x.tar.gz
caafdce18e0959f078b4b478d4f352ebf3d556e373265fc7831f1a6d70219ee0 rootlesskit-x86_64.tar.gz
6 changes: 6 additions & 0 deletions Dockerfile.d/SHA256SUMS.d/slirp4netns-v1.3.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
2dd9aac6c2e3203e53cb7b6e4b9fc7123e4e4a9716c8bb1d95951853059a6af5 slirp4netns-aarch64
ed618c0f2c74014bb736e9e427e18c8791ad9d68311872a41b06fac0d7cb9ef2 slirp4netns-armv7l
a10f70209cee0dd0532fea0e8b6bfde5d16dec5206fd4b3387d861721456de66 slirp4netns-ppc64le
38209015c2f3f4619d9fc46610852887910f33c7a0b96f7d2aa835a7bbc73f31 slirp4netns-riscv64
9f42718455b1f9cf4b6f0efee314b78e860b8c36dbbb6290f09c8fbedda9ff8a slirp4netns-s390x
4bc5d6c311f9fa7ae00ce54aefe10c2afaf0800fe9e99f32616a964ed804a9e1 slirp4netns-x86_64
4 changes: 2 additions & 2 deletions Dockerfile.d/test-integration-rootless.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if [[ "$(id -u)" = "0" ]]; then
fi

# Switch to the rootless user via SSH
systemctl start sshd
systemctl start ssh
exec ssh -o StrictHostKeyChecking=no rootless@localhost "$0" "$@"
else
containerd-rootless-setuptool.sh install
Expand All @@ -48,7 +48,7 @@ else
[proxy_plugins]
[proxy_plugins."stargz"]
type = "snapshot"
address = "/run/user/1000/containerd-stargz-grpc/containerd-stargz-grpc.sock"
address = "/run/user/$(id -u)/containerd-stargz-grpc/containerd-stargz-grpc.sock"
EOF
systemctl --user restart containerd.service
containerd-rootless-setuptool.sh -- install-ipfs --init --offline # offline ipfs daemon for testing
Expand Down
4 changes: 2 additions & 2 deletions cmd/nerdctl/container_create_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ func TestCreateWithMACAddress(t *testing.T) {
WantErr bool
Expect string
}{
{"host", true, "conflicting options"},
{"host", true, ""},
{"none", true, "can't open '/sys/class/net/eth0/address'"},
{"container:whatever" + tID, true, "conflicting options"},
{"container:whatever" + tID, true, ""},
{"bridge", false, ""},
{networkBridge, false, ""},
{networkMACvlan, false, ""},
Expand Down
Loading
Loading