Skip to content

introduce support for cgroup=host|private#292

Merged
ndeloof merged 1 commit intocompose-spec:masterfrom
ndeloof:cgroupns
Dec 20, 2022
Merged

introduce support for cgroup=host|private#292
ndeloof merged 1 commit intocompose-spec:masterfrom
ndeloof:cgroupns

Conversation

@ndeloof
Copy link
Collaborator

@ndeloof ndeloof commented Dec 16, 2022

Which issue(s) this PR fixes:
Fixes #148
see docker/compose#8167

@thediveo
Copy link

#148 (comment) lists the docker CLI allowed values which include an empty string:

docker run --help | grep cgroup
      --cgroupns string                Cgroup namespace to use (host|private)
                                       'host':    Run the container in the Docker host's cgroup namespace
                                       'private': Run the container in its own private cgroup namespace
                                       '':        Use the cgroup namespace as configured by the
                                                  default-cgroupns-mode option on the daemon (default)

Would this be also needed to be carried over to the compose world?

@ndeloof
Copy link
Collaborator Author

ndeloof commented Dec 16, 2022

@thediveo cgroup: "" would probably better be defined in a compose file by not setting cgroup attribute. Then the actual behavior would be left to the container runtime (out of the scope of the compose spec) which is indeed default-cgroupns-mode option on docked, but could be a different choice with alternative runtimes.

@ndeloof ndeloof changed the title introduce support for cgroup=hostLprivate introduce support for cgroup=host|private Dec 19, 2022
@ndeloof ndeloof requested a review from glours December 19, 2022 09:53
@BorderCloud
Copy link

+1

@ndeloof ndeloof force-pushed the cgroupns branch 2 times, most recently from 57ef6a0 to 3bd31a9 Compare December 20, 2022 07:55
Signed-off-by: Nicolas De Loof <[email protected]>
@ndeloof ndeloof merged commit 81229b9 into compose-spec:master Dec 20, 2022
@ndeloof ndeloof deleted the cgroupns branch December 20, 2022 07:55
@NersesAM
Copy link

NersesAM commented Mar 9, 2023

has this been released? Which version of compose has it? I don't see it reflected in https://docs.docker.com/compose/compose-file/

@thediveo
Copy link

Don't know the exact version but as of "Docker compose version v2.18.1" it is available. I'm now using it to slightly simplify my deployments; see here: https://github.com/thediveo/lxkns/blob/develop/README.md#quick-start

@thediveo
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing composer specification equivalent for --cgroupns=[host|private]/API1.41

6 participants