Skip to content

Commit 9ec475a

Browse files
authored
Merge pull request #820 from AkihiroSuda/containerd-1.6.0
update containerd (1.6.0), fuse-overlayfs (1.8.2), docs
2 parents b1265f1 + c1e6277 commit 9ec475a

File tree

9 files changed

+61
-14
lines changed

9 files changed

+61
-14
lines changed

.cirrus.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ windows_task:
6565
matrix:
6666
- name: "Windows/containerd-1.6"
6767
env:
68-
ctrdVersion: 1.6.0-beta.4
68+
ctrdVersion: 1.6.0
6969
env:
7070
CGO_ENABLED: 0
7171
build_script:

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
timeout-minutes: 30
5656
strategy:
5757
matrix:
58-
containerd: [v1.4.5, v1.5.9, main]
58+
containerd: [v1.4.5, v1.6.0, main]
5959
env:
6060
CONTAINERD_VERSION: "${{ matrix.containerd }}"
6161
steps:
@@ -80,7 +80,7 @@ jobs:
8080
timeout-minutes: 60
8181
strategy:
8282
matrix:
83-
containerd: [v1.4.5, v1.5.9, main]
83+
containerd: [v1.4.5, v1.6.0, main]
8484
env:
8585
CONTAINERD_VERSION: "${{ matrix.containerd }}"
8686
steps:

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# TODO: verify commit hash
1919

2020
# Basic deps
21-
ARG CONTAINERD_VERSION=v1.5.9
21+
ARG CONTAINERD_VERSION=v1.6.0
2222
ARG RUNC_VERSION=v1.1.0
2323
ARG CNI_PLUGINS_VERSION=v1.0.1
2424

@@ -36,7 +36,7 @@ ARG SLIRP4NETNS_VERSION=v1.1.12
3636
# Extra deps: bypass4netns
3737
ARG BYPASS4NETNS_VERSION=v0.2.2
3838
# Extra deps: FUSE-OverlayFS
39-
ARG FUSE_OVERLAYFS_VERSION=v1.8.1
39+
ARG FUSE_OVERLAYFS_VERSION=v1.8.2
4040
ARG CONTAINERD_FUSE_OVERLAYFS_VERSION=v1.0.4
4141
# Extra deps: IPFS
4242
ARG IPFS_VERSION=v0.11.0

Dockerfile.d/SHA256SUMS.d/fuse-overlayfs-v1.8.1

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
7c2ffe7ad6fed957a400fb3900c1c2586d756aff0fa38c6998d5ac467a26f288 fuse-overlayfs-aarch64
2+
f081e183d58f634975c7aaa10bf0a4d9366d5def722638031d7dcd128d8dd0a0 fuse-overlayfs-armv7l
3+
1824b0e4fe0e3a8ebdb357371d8e21cf991046b2e0088c205ba20fdd9ecb1575 fuse-overlayfs-ppc64le
4+
5aa49c081dc4f9e0ad82f08fb90fb4e1bf1835c24ce0dc5cbd96d7d59d0cff8c fuse-overlayfs-s390x
5+
d7488446d5a17586a4aa3cc15e21d675a04a04f553e031c7789ed5e83ec4d829 fuse-overlayfs-x86_64

README.md

+23-1
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,32 @@ See also [`./examples/compose-wordpress`](./examples/compose-wordpress).
5252

5353
### Debugging Kubernetes
5454

55-
To list Kubernetes containers:
55+
To list local Kubernetes containers:
5656
```console
5757
# nerdctl --namespace k8s.io ps -a
5858
```
5959

60+
To build an image for local Kubernetes without using registry:
61+
```console
62+
# nerdctl --namespace k8s.io build -t foo /some-dockerfile-directory
63+
# kubectl apply -f - <<EOF
64+
apiVersion: v1
65+
kind: Pod
66+
metadata:
67+
name: foo
68+
spec:
69+
containers:
70+
- name: foo
71+
image: foo
72+
imagePullPolicy: Never
73+
EOF
74+
```
75+
76+
To load an image archive (`docker save` format or OCI format) into local Kubernetes:
77+
```console
78+
# nerdctl --namespace k8s.io load < /path/to/image.tar
79+
```
80+
6081
### Rootless mode
6182

6283
To launch rootless containerd:
@@ -136,6 +157,7 @@ Major:
136157
- Recursive read-only (RRO) bind-mount: `nerdctl run -v /mnt:/mnt:rro` (make children such as `/mnt/usb` to be read-only, too).
137158
Requires kernel >= 5.12, and crun >= 1.4 or runc >= 1.1 (PR [#3272](https://github.com/opencontainers/runc/pull/3272)).
138159
- [Cosign integration](./docs/cosign.md): `nerdctl pull --verify=cosign` and `nerdctl push --sign=cosign`
160+
- [Accelerated rootless containers using bypass4netns](./docs/rootless.md): `nerdctl run --label nerdctl/bypass4netns=true`
139161

140162
Minor:
141163
- Namespacing: `nerdctl --namespace=<NS> ps` .

docs/faq.md

+25
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- [How to change the CNI binary path?](#how-to-change-the-cni-binary-path)
2121
- [Kubernetes](#kubernetes)
2222
- [`nerdctl ps -a` does not show Kubernetes containers](#nerdctl-ps--a-does-not-show-kubernetes-containers)
23+
- [How to build an image for Kubernetes?](#how-to-build-an-image-for-kubernetes)
2324
- [containerd socket (`/run/containerd/containerd.sock`)](#containerd-socket-runcontainerdcontainerdsock)
2425
- [Does nerdctl have an equivalent of `DOCKER_HOST=ssh://<USER>@<REMOTEHOST>` ?](#does-nerdctl-have-an-equivalent-of-docker_hostsshuserremotehost-)
2526
- [Does nerdctl have an equivalent of `sudo usermod -aG docker <USER>` ?](#does-nerdctl-have-an-equivalent-of-sudo-usermod--ag-docker-user-)
@@ -243,6 +244,30 @@ Try `sudo nerdctl --namespace=k8s.io ps -a` .
243244

244245
Note: k3s users have to specify `--address` too: `sudo nerdctl --address=/run/k3s/containerd/containerd.sock --namespace=k8s.io ps -a`
245246

247+
### How to build an image for Kubernetes?
248+
249+
For a multi-node cluster:
250+
```console
251+
$ nerdctl build -t example.com/foo /some-dockerfile-directory
252+
$ nerdctl push example.com/foo
253+
```
254+
255+
For a single-node cluster w/o registry:
256+
```console
257+
# nerdctl --namespace k8s.io build -t foo /some-dockerfile-directory
258+
# kubectl apply -f - <<EOF
259+
apiVersion: v1
260+
kind: Pod
261+
metadata:
262+
name: foo
263+
spec:
264+
containers:
265+
- name: foo
266+
image: foo
267+
imagePullPolicy: Never
268+
EOF
269+
```
270+
246271
## containerd socket (`/run/containerd/containerd.sock`)
247272

248273
### Does nerdctl have an equivalent of `DOCKER_HOST=ssh://<USER>@<REMOTEHOST>` ?

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/compose-spec/compose-go v1.0.9
88
github.com/containerd/cgroups v1.0.3
99
github.com/containerd/console v1.0.3
10-
github.com/containerd/containerd v1.6.0-rc.4
10+
github.com/containerd/containerd v1.6.0
1111
github.com/containerd/continuity v0.2.2
1212
github.com/containerd/go-cni v1.1.3
1313
github.com/containerd/imgcrypt v1.1.3

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTV
294294
github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c=
295295
github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc5qtSuYx1YUb/s=
296296
github.com/containerd/containerd v1.6.0-rc.1/go.mod h1:jdeOXdXovU4bWF2Bd2hJjqpcOrrpSC1wmFCTtf6LD+A=
297-
github.com/containerd/containerd v1.6.0-rc.4 h1:l3ngWaUxlPVURYC/4B+Uzc0m30H72K9MMbTqj6u0tZM=
298-
github.com/containerd/containerd v1.6.0-rc.4/go.mod h1:g4o55STrmMXiGegQmOMUb41SwwJk9wq+DlmFxuA8nu0=
297+
github.com/containerd/containerd v1.6.0 h1:CLa12ZcV0d2ZTRKq1ssioeJpTnPJBMyndpEKA+UtzJg=
298+
github.com/containerd/containerd v1.6.0/go.mod h1:1nJz5xCZPusx6jJU8Frfct988y0NpumIq9ODB0kLtoE=
299299
github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
300300
github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
301301
github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=

0 commit comments

Comments
 (0)