You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to handle platform-specific options/flags #15374
Docker has a lot of linux specific flags, and it would make sense to agree on a design that works for all.
Should we have platform prefixes like --linux-blkio-weight ? Or should we just error out if the functionality is not supported on the target platform? Or should we simply pass in a generic flag that gets passed to the underlying runtime (runC in the future) ?
may I propose to also group related flags? seems like docker has already, for instance, many cgroups related flags (and others are being added as we speak) and I think it would make sense to group them all under a common flag.
What I have in mind is to add a new --linux-cgroup-opt and deprecate all the other cgroup flags, e.g.:
docker run --linux-cgroup-opt memory-swap=100 --linux-cgroup-opt memory-swappiness=1 --linux-cgroup-opt read-iops-device=/dev/sda:500 --linux-cgroup-opt read-iops-device=/dev/sdc3:123 busybox top
Another case is --uts, --pid, --ipc where a generic --linux-ns pid:A --linux-ns uts:B could be better. linux prefix is arbitrary of course, could not be present.
WDYT? I'll create another issue to track this if it's not pertinent here and work on this.
Why do we need the linux prefix. Do you see a conflict on cgroup-opt? Or --ns? I have no problem with your concept other then it causes the every growing complexity of the docker run command line.
linux prefix is arbitrary of course, could not be present.
I don't have a strong opinion on the prefix.
That said, as Docker is moving to support Windows/FreeBSD I personally think a prefix is not bad to have between the many options/flags Docker run already has. This is just a personal opinion and I have no problem with just --cgroup-opt and --ns if they get ignored (still there will be the need to document flag's supported system).
I'm not sure about your point on complexity. I'd argue having a generic flag for something and many clear (documented) options for it would be less complex than having a billion flags, given also each of these are logically grouped (cgroups/ns for instance).
Activity
runcom commentedon Sep 11, 2015
may I propose to also group related flags? seems like docker has already, for instance, many cgroups related flags (and others are being added as we speak) and I think it would make sense to group them all under a common flag.
What I have in mind is to add a new
--linux-cgroup-optand deprecate all the other cgroup flags, e.g.:Another case is
--uts,--pid,--ipcwhere a generic--linux-ns pid:A --linux-ns uts:Bcould be better.linuxprefix is arbitrary of course, could not be present.WDYT? I'll create another issue to track this if it's not pertinent here and work on this.
rhatdan commentedon Sep 11, 2015
Why do we need the linux prefix. Do you see a conflict on cgroup-opt? Or --ns? I have no problem with your concept other then it causes the every growing complexity of the docker run command line.
runcom commentedon Sep 11, 2015
@rhatdan
I don't have a strong opinion on the prefix.
That said, as Docker is moving to support Windows/FreeBSD I personally think a prefix is not bad to have between the many options/flags Docker run already has. This is just a personal opinion and I have no problem with just
--cgroup-optand--nsif they get ignored (still there will be the need to document flag's supported system).I'm not sure about your point on complexity. I'd argue having a generic flag for something and many clear (documented) options for it would be less complex than having a billion flags, given also each of these are logically grouped (cgroups/ns for instance).
thaJeztah commentedon Oct 17, 2024
closing as stale