Skip to content

Commit

Permalink
Merge pull request moby#48216 from AkihiroSuda/docker-install-417
Browse files Browse the repository at this point in the history
dockerd-rootless-setuptool.sh: move RootlessKit smoke test
  • Loading branch information
thaJeztah authored Jul 24, 2024
2 parents 48877c6 + e223724 commit be7470c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions contrib/dockerd-rootless-setuptool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,6 @@ init() {
# - sysctl: "net.ipv4.ip_unprivileged_port_start"
# - external binary: slirp4netns
# - 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"
Expand Down Expand Up @@ -400,7 +393,16 @@ cli_ctx_rm() {
# CLI subcommand: "install"
cmd_entrypoint_install() {
init
# requirements are already checked in init()
# Most requirements are already checked in init(), except the smoke test below for RootlessKit.
# https://github.com/docker/docker-install/issues/417

# 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

if [ -z "$SYSTEMD" ]; then
install_nonsystemd
else
Expand Down

0 comments on commit be7470c

Please sign in to comment.