t6nand
t6nand

Reputation: 780

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?

Upvotes: 5

Views: 3867

Answers (2)

t6nand
t6nand

Reputation: 780

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" }
        ]

Upvotes: 6

serejja
serejja

Reputation: 23851

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.

Upvotes: 2

Related Questions