Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set docker run arguments on marathon spec

I have been using docker to run images along with some options like:

docker run --net host --oom-kill-disable -d -p <port>:<port> image

How do I set values like --oom-kill-disable on marathon?

like image 432
t6nand Avatar asked Jun 06 '16 15:06

t6nand


2 Answers

It is required for docker containers in their marathon spec to specify a boolean value for oom-kill-disable flag for executor to run properly.

So the spec would include:

"parameters": [
            { "key": "oom-kill-disable", "value": "true" }
        ]
like image 199
t6nand Avatar answered Nov 01 '22 13:11

t6nand


I'm not quite sure if you can pass an empty value in this case, but you could go with something like this:

"container": {
    "type": "DOCKER",
    "docker": {
        "network": "HOST",
        "image": "your/image",
        "parameters": [
            { "key": "oom-kill-disable", "value": "" }
        ]
    }
}

You may read a little bit more here in "Privileged Mode and Arbitrary Docker Options" section.

like image 43
serejja Avatar answered Nov 01 '22 13:11

serejja