dockerd-rootless-setuptool.sh: check RootlessKit functionality

RootlessKit will print hints if something is still unsatisfied.

e.g., `kernel.apparmor_restrict_unprivileged_userns` constraint
rootless-containers/rootlesskit@33c3e7ca6c

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda 2024-03-06 07:43:00 +09:00
parent 49fd8df9b9
commit b32cfc3b3a
No known key found for this signature in database
GPG key ID: 49524C6F9F638F1A

View file

@ -269,6 +269,13 @@ init() {
# - sysctl: "net.ipv4.ip_unprivileged_port_start" # - sysctl: "net.ipv4.ip_unprivileged_port_start"
# - external binary: slirp4netns # - external binary: slirp4netns
# - external binary: fuse-overlayfs # - external binary: fuse-overlayfs
# check RootlessKit functionality. RootlessKit will print hints if something is still unsatisfied.
# (e.g., `kernel.apparmor_restrict_unprivileged_userns` constraint)
if ! rootlesskit true; then
ERROR "RootlessKit failed, see the error messages and https://rootlesscontaine.rs/getting-started/common/ ."
exit 1
fi
} }
# CLI subcommand: "check" # CLI subcommand: "check"