For `--oom-kill-disable` and `--read-only`, could use `--oom-kill-disable=true` and `--read-only=true` to enable them when `docker run`.
On Sat, Aug 6, 2016 at 5:02 PM, Hendrik Haddorp <[email protected]> wrote: > Hi, > I have not tried if they work in the form. The docker documentation does > not show them with a = but if that works it would be good. What about > --oom-kill-disable and --read-only? > > On 06/08/16 10:52, haosdent wrote: > > Hi, @Hendrik All these parameters follow this form `--key=value`. For > > example, you could use > > > > docker run --add-host=docker:10.180.0.1 --rm -it debian > > > > when use --add-host option which key is `add-host` and value is > > `docker:10.180.0.1`. Do you meet any problems when using them? > > > > On Sat, Aug 6, 2016 at 4:42 PM, Hendrik Haddorp > > <[email protected] <mailto:[email protected]>> wrote: > > > > Looking at > > https://docs.docker.com/engine/reference/commandline/run/ > > <https://docs.docker.com/engine/reference/commandline/run/> > > some examples that could be useful: > > --add-host value > > --cap-add value > > --cap-drop value > > a few DNS related settings > > --expose value > > --ip string > > --link value > > --oom-kill-disable > > --read-only > > --security-opt value > > > > On 06/08/16 08:58, haosdent wrote: > > > Hi, @Hendrik > > > > > > >which seems to be quite a restriction when looking at all the > > options > > > the docker clihas > > > May you provide any examples? > > > > > > On Sat, Aug 6, 2016 at 3:49 AM, Hendrik Haddorp > > > <[email protected] <mailto:[email protected]> > > <mailto:[email protected] <mailto:[email protected]>>> > > wrote: > > > > > > Hi, > > > > > > in mesos.proto [1] it states: > > > // Allowing arbitrary parameters to be passed to docker > CLI. > > > // Note that anything passed to this field is not > guaranteed > > > // to be supported moving forward, as we might move away > > from > > > // the docker CLI. > > > repeated Parameter parameters = 5; > > > > > > After failing to get my containers started with parameters I > > > checked the > > > code in docker.cpp [2] and found this: > > > foreach (const Parameter& parameter, > > dockerInfo.parameters()) { > > > argv.push_back("--" + parameter.key() + "=" + > > parameter.value()); > > > } > > > > > > So I can actually only use parameters in the form > > --KEY=VALUE, which > > > seems to be quite a restriction when looking at all the > > options the > > > docker cli has. What is the reason for this limitation and is > > > there any > > > way around this? > > > > > > regards, > > > Hendrik > > > > > > [1] > > > > > https://github.com/apache/mesos/blob/master/include/ > mesos/mesos.proto > > <https://github.com/apache/mesos/blob/master/include/ > mesos/mesos.proto> > > > > > <https://github.com/apache/mesos/blob/master/include/ > mesos/mesos.proto > > <https://github.com/apache/mesos/blob/master/include/ > mesos/mesos.proto>> > > > [2] > > > > > https://github.com/apache/mesos/blob/master/src/docker/docker.cpp > > <https://github.com/apache/mesos/blob/master/src/docker/docker.cpp> > > > > > <https://github.com/apache/mesos/blob/master/src/docker/docker.cpp > > <https://github.com/apache/mesos/blob/master/src/docker/docker.cpp>> > > > > > > > > > > > > > > > -- > > > Best Regards, > > > Haosdent Huang > > > > > > > > > > -- > > Best Regards, > > Haosdent Huang > > -- Best Regards, Haosdent Huang

