Closed
Description
Planning to release v2.0 or v1.8 after merging:
I'm leaning toward to bump up the major version (ahead of containerd v2), as this PR significantly changes the design of the rootless mode
Note
Rootless containerd recognizes the following environment variables to configure the behavior of RootlessKit:
- ...
CONTAINERD_ROOTLESS_ROOTLESSKIT_DETACH_NETNS=(auto|true|false)
: whether to launch rootlesskit with the "detach-netns" mode.
Defaults to "auto", which is resolved to "true" if RootlessKit >= 2.0 is installed.
The "detached-netns" mode acceleratesnerdctl (pull|push|build)
and enablesnerdctl run --net=host
,
however, there is a relatively minor drawback with the current version of BuildKit:
the host loopback IP address (127.0.0.1) is exposed to Dockerfile's "RUN" instructions duringnerdctl build
(notnerdctl run
).
If you want to hide 127.0.0.1 from "RUN" instructions, you should setCONTAINERD_ROOTLESS_ROOTLESSKIT_DETACH_NETNS
to "false".
To set these variables, create ~/.config/systemd/user/containerd.service.d/override.conf
as follows:
[Service]
Environment=CONTAINERD_ROOTLESS_ROOTLESSKIT_DETACH_NETNS="false"
And then run the following commands:
systemctl --user daemon-reload
systemctl --user restart containerd
cc @containerd/nerdctl-maintainers