Skip to content

How to handle platform-specific options/flags #15374

Closed as not planned
Closed as not planned

Description

@tiborvass

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) ?

/cc @crosbymichael @LK4D4

Activity

  1. runcom commented on Sep 11, 2015

    @runcom
    Member

    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.

  2. rhatdan commented on Sep 11, 2015

    @rhatdan
    Contributor

    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.

  3. runcom commented on Sep 11, 2015

    @runcom
    Member

    @rhatdan

    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).

  4. thaJeztah commented on Oct 17, 2024

    @thaJeztah
    Member

    closing as stale

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions