mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
allow setting --cgroup-parent for docker run commands
This commit is contained in:
parent
2986b37de0
commit
0df8838d15
@ -589,6 +589,11 @@ function kube::build::run_build_command_ex() {
|
||||
--env "GOGCFLAGS=${GOGCFLAGS:-}"
|
||||
)
|
||||
|
||||
if [ ! -z "${DOCKER_CGROUP_PARENT:-}" ]; then
|
||||
kube::log::status "Using ${DOCKER_CGROUP_PARENT} as container cgroup parent"
|
||||
docker_run_opts+=(--cgroup-parent "${DOCKER_CGROUP_PARENT}")
|
||||
fi
|
||||
|
||||
# If we have stdin we can run interactive. This allows things like 'shell.sh'
|
||||
# to work. However, if we run this way and don't have stdin, then it ends up
|
||||
# running in a daemon-ish mode. So if we don't have a stdin, we explicitly
|
||||
|
Loading…
Reference in New Issue
Block a user