set cgroupns=private

This commit is contained in:
Benjamin Elder
2023-05-17 19:13:59 -07:00
parent 8dd9d10681
commit d16895a467
2 changed files with 7 additions and 0 deletions

View File

@@ -167,6 +167,11 @@ func commonArgs(cluster string, cfg *config.Cluster, networkName string, nodeNam
// this can be enabled by default in docker daemon.json, so we explicitly
// disable it, we want our entrypoint to be PID1, not docker-init / tini
"--init=false",
// note: requires API v1.41+ from Dec 2020 in Docker 20.10.0
// this is the default with cgroups v2 but not with cgroups v1, unless
// overridden in the daemon --default-cgroupns-mode
// https://github.com/docker/cli/pull/3699#issuecomment-1191675788
"--cgroupns=private",
}
// enable IPv6 if necessary

View File

@@ -136,6 +136,8 @@ func commonArgs(cfg *config.Cluster, networkName string, nodeNames []string) ([]
"--label", fmt.Sprintf("%s=%s", clusterLabelKey, cfg.Name),
// specify container implementation to systemd
"-e", "container=podman",
// this is the default in cgroupsv2 but not in v1
"--cgroupns=private",
}
// enable IPv6 if necessary