Skip to content

Commit 08792cc

Browse files
authored
Merge pull request #493 from AkihiroSuda/ci-fedora35
Ci: update Fedora to 35; update BuildKit (v0.9.2); update docs; nits
2 parents d5a2d1a + c48c019 commit 08792cc

File tree

9 files changed

+31
-35
lines changed

9 files changed

+31
-35
lines changed

Diff for: .github/workflows/test.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
runs-on: macos-10.15
132132
timeout-minutes: 40
133133
env:
134-
VAGRANT_VAGRANTFILE: hack/Vagrantfile.fedora34
134+
VAGRANT_VAGRANTFILE: hack/Vagrantfile.fedora
135135
steps:
136136
- uses: actions/setup-go@v2
137137
with:
@@ -148,24 +148,27 @@ jobs:
148148
run: |
149149
vagrant up
150150
vagrant ssh-config >> ~/.ssh/config
151+
- name: "Show info"
152+
run: ssh default -- sudo nerdctl info
151153
- name: "Run tests"
152154
uses: nick-invision/retry@v2
153155
with:
154156
timeout_minutes: 10
155157
retry_on: error
156158
max_attempts: 2
157-
# TODO: enable -test.kill-daemon, after Fedora updates containerd to a recent version (Mar 2021)
159+
# TODO: enable -test.kill-daemon
158160
command: ssh default -- "sudo /vagrant/nerdctl.test -test.v"
159161
- name: "Install rootless containerd"
160162
run: |
161163
ssh default -- containerd-rootless-setuptool.sh install
162-
ssh default -- containerd-rootless-setuptool.sh install-fuse-overlayfs
164+
- name: "Show info (rootless)"
165+
run: ssh default -- nerdctl info
163166
- name: "Run tests (rootless)"
164167
uses: nick-invision/retry@v2
165168
with:
166169
timeout_minutes: 10
167170
retry_on: error
168171
max_attempts: 2
169-
command: ssh default -- "CONTAINERD_SNAPSHOTTER=fuse-overlayfs /vagrant/nerdctl.test -test.v -test.kill-daemon"
172+
command: ssh default -- "/vagrant/nerdctl.test -test.v -test.kill-daemon"
170173
- name: "Uninstall rootless containerd"
171174
run: ssh default -- containerd-rootless-setuptool.sh uninstall

Diff for: Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ ARG CNI_PLUGINS_VERSION=1.0.1
2323
# Extra deps: CNI isolation
2424
ARG CNI_ISOLATION_VERSION=0.0.4
2525
# Extra deps: Build
26-
ARG BUILDKIT_VERSION=0.9.1
26+
ARG BUILDKIT_VERSION=0.9.2
2727
# Extra deps: Lazy-pulling
2828
ARG STARGZ_SNAPSHOTTER_VERSION=0.9.0
2929
# Extra deps: Encryption
30-
ARG IMGCRYPT_VERSION=1.1.1
30+
ARG IMGCRYPT_VERSION=1.1.2
3131
# Extra deps: Rootless
3232
ARG ROOTLESSKIT_VERSION=0.14.5
3333
ARG SLIRP4NETNS_VERSION=1.1.12

Diff for: Dockerfile.d/SHA256SUMS.d/buildkit-0.9.1

-2
This file was deleted.

Diff for: Dockerfile.d/SHA256SUMS.d/buildkit-0.9.2

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
931d8bb6b461a396c54ed2ce4fa48a2d5eafeb6985a97823e39e549bc89bec27 buildkit-v0.9.2.linux-amd64.tar.gz
2+
d97d1e0380d715777875b3acf5b7d2d67b715b983b4827a385eb99f372f9538d buildkit-v0.9.2.linux-arm64.tar.gz

Diff for: cmd/nerdctl/container.go

+1
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,6 @@ func newContainerCommand() *cobra.Command {
5252
func containerLsCommand() *cobra.Command {
5353
x := newPsCommand()
5454
x.Use = "ls"
55+
x.Aliases = []string{"list"}
5556
return x
5657
}

Diff for: cmd/nerdctl/image.go

+2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,13 @@ func newImageCommand() *cobra.Command {
5050
func imageLsCommand() *cobra.Command {
5151
x := newImagesCommand()
5252
x.Use = "ls"
53+
x.Aliases = []string{"list"}
5354
return x
5455
}
5556

5657
func imageRmCommand() *cobra.Command {
5758
x := newRmiCommand()
5859
x.Use = "rm"
60+
x.Aliases = []string{"remove"}
5961
return x
6062
}

Diff for: docs/multi-platform.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ e.g., ARM on Intel, and vice versa.
66
## Preparation: Register QEMU to `/proc/sys/fs/binfmt_misc`
77

88
```console
9+
$ sudo systemctl start containerd
10+
911
$ sudo nerdctl run --privileged --rm tonistiigi/binfmt --install all
1012

1113
$ ls -1 /proc/sys/fs/binfmt_misc/qemu*
@@ -18,7 +20,10 @@ $ ls -1 /proc/sys/fs/binfmt_misc/qemu*
1820
/proc/sys/fs/binfmt_misc/qemu-s390x
1921
```
2022

21-
The `tonistiigi/binfmt` container must be executed with `--privileged`.
23+
The `tonistiigi/binfmt` container must be executed with `--privileged`, and with rootful mode (`sudo`).
24+
25+
This container is not a daemon, and exits immediately after registering QEMU to `/proc/sys/fs/binfmt_misc`.
26+
Run `ls -1 /proc/sys/fs/binfmt_misc/qemu*` to confirm registration.
2227

2328
See also https://github.com/tonistiigi/binfmt
2429

Diff for: docs/rootless.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,19 @@ To enable BuildKit, run the following command:
4444
$ containerd-rootless-setuptool.sh install-buildkit
4545
```
4646

47-
### FUSE-OverlayFS
47+
## Snapshotters
48+
49+
### OverlayFS
4850

49-
The `overlayfs` snapshotter only works on the following hosts:
50-
- Any distro, with kernel >= 5.11, and without SELinux
51+
The default `overlayfs` snapshotter only works on the following hosts:
52+
- Any distro, with kernel >= 5.13
53+
- Non-SELinux distro, with kernel >= 5.11
5154
- Ubuntu since 2015
52-
- Debian since 10
5355

5456
For other hosts, [`fuse-overlayfs` snapshotter](https://github.com/containerd/fuse-overlayfs-snapshotter) needs to be used instead.
5557

58+
### FUSE-OverlayFS
59+
5660
To enable `fuse-overlayfs` snapshotter, run the following command:
5761
```console
5862
$ containerd-rootless-setuptool.sh install-fuse-overlayfs
@@ -78,11 +82,6 @@ If `fuse-overlayfs` does not work, try `export CONTAINERD_SNAPSHOTTER=native`.
7882
### Stargz Snapshotter
7983
[Stargz Snapshotter](./stargz.md) enables lazy-pulling of images.
8084

81-
As of Stargz Snapshotter 0.5.0, Rootless Stargz Snapshotter supports the following hosts:
82-
- Any distro, with kernel >= 5.11
83-
- Ubuntu (>= 15.XX)
84-
- Debian (>= 10)
85-
8685
To enable Stargz snapshotter, run the following command:
8786
```console
8887
$ containerd-rootless-setuptool.sh install-stargz
@@ -108,4 +107,4 @@ See https://github.com/containerd/stargz-snapshotter/blob/master/docs/pre-conver
108107
## Troubleshooting
109108

110109
### Hint to Fedora users
111-
- If SELinux is enabled on your host, you need to use [`fuse-overlayfs` instead of `overlayfs`](#fuse-overlayfs).
110+
- If SELinux is enabled on your host and your kernel is older than 5.13, you need to use [`fuse-overlayfs` instead of `overlayfs`](#fuse-overlayfs).

Diff for: hack/Vagrantfile.fedora34 renamed to hack/Vagrantfile.fedora

+2-16
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Vagrant box for testing cgroup v2
55
Vagrant.configure("2") do |config|
6-
config.vm.box = "fedora/34-cloud-base"
6+
config.vm.box = "fedora/35-cloud-base"
77
memory = 4096
88
cpus = 2
99
config.vm.provider :virtualbox do |v|
@@ -28,33 +28,19 @@ Vagrant.configure("2") do |config|
2828
fi
2929
GOARCH=amd64
3030
31-
# Install RPMs (TODO: remove fuse-overlayfs after release of Fedora 34)
3231
dnf install -y \
3332
make \
3433
containerd \
3534
containernetworking-plugins \
3635
iptables \
3736
slirp4netns \
38-
fuse-overlayfs \
3937
openssl
4038
systemctl enable --now containerd
4139
4240
# Install RootlessKit
43-
ROOTLESSKIT_VERSION=0.14.2
41+
ROOTLESSKIT_VERSION=0.14.5
4442
curl -sSL https://github.com/rootless-containers/rootlesskit/releases/download/v${ROOTLESSKIT_VERSION}/rootlesskit-$(uname -m).tar.gz | tar Cxzv /usr/local/bin
4543
46-
# Install containerd-fuse-overlayfs (required on SELinux hosts: https://github.com/moby/moby/issues/42333)
47-
CONTAINERD_FUSE_OVERLAYFS_VERSION=1.0.2
48-
curl -sSL https://github.com/containerd/fuse-overlayfs-snapshotter/releases/download/v${CONTAINERD_FUSE_OVERLAYFS_VERSION}/containerd-fuse-overlayfs-${CONTAINERD_FUSE_OVERLAYFS_VERSION}-linux-${GOARCH}.tar.gz | tar Cxzv /usr/local/bin
49-
mkdir -p /home/vagrant/.config/containerd
50-
cat <<EOF >/home/vagrant/.config/containerd/config.toml
51-
[proxy_plugins]
52-
[proxy_plugins."fuse-overlayfs"]
53-
type = "snapshot"
54-
address = "/run/user/$(id -u vagrant)/containerd-fuse-overlayfs.sock"
55-
EOF
56-
chown -R vagrant /home/vagrant/.config
57-
5844
# Delegate cgroup v2 controllers
5945
mkdir -p /etc/systemd/system/[email protected]
6046
cat <<EOF >/etc/systemd/system/[email protected]/delegate.conf

0 commit comments

Comments
 (0)