You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Updated an example config to v2 syntax
* Updated for shim v2 (relates to containerd#2767)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Copy file name to clipboardExpand all lines: docs/rootless.md
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,28 +4,33 @@ A non-root user can execute containerd by using [`user_namespaces(7)`](http://ma
4
4
5
5
For example [RootlessKit](https://github.com/rootless-containers/rootlesskit) can be used for setting up a user namespace (along with mount namespace and optionally network namespace). Please refer to RootlessKit documentation for further information.
6
6
7
+
See also [Rootless Docker documentation](https://docs.docker.com/engine/security/rootless/).
sh -c "rm -rf /run/containerd; containerd -c config.toml"
13
15
```
14
16
15
17
*`--net=slirp4netns --copy-up=/etc` is only required when you want to unshare network namespaces
16
-
* Depending on the containerd plugin configuration, you may also need to add more `--copy-up` options, e.g. `--copy-up=/run`, which mounts a writable tmpfs on `/run`, with symbolic links to the files under the `/run` on the parent namespace.
18
+
*`--copy-up=/DIR` mounts a writable tmpfs on `/DIR` with symbolic links to the files under the `/DIR` on the parent namespace
19
+
so that the user can add/remove files under `/DIR` in the mount namespace.
20
+
`--copy-up=/etc` and `--copy-up=/run` are needed on typical setup.
21
+
Depending on the containerd plugin configuration, you may also need to add more `--copy-up` options.
22
+
*`rm -rf /run/containerd` is required for v2 shim as a workaround for [#2767](https://github.com/containerd/containerd/issues/2767).
23
+
This command removes the "copied-up" symbolic link to `/run/containerd` on the parent namespace (if exists), which cannot be accessed by non-root users.
24
+
The actual `/run/containerd` directory on the host is not affected.
17
25
*`--state-dir` is set to a random directory under `/tmp` if unset. RootlessKit writes the PID to a file named `child_pid` under this directory.
18
26
* You need to provide `config.toml` with your own path configuration. e.g.
0 commit comments