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?

  • Run postgresql docker image with persistent data returns permission error
  • Docker registry login fails with “Certificate signed by unknown authority”
  • Jenkins inside docker loses configuration when container is restarted
  • Docker exec npm command
  • Pushing a tag to private docker registry in artifactory fails from mac
  • How to get memory usage of processes running in docker container?
  • chowning a docker folder from dockerfile
  • X11 forwarding with PyCharm and Docker Interpreter
  • Docker run ignore stderr error messages
  • Simple script needed to delete all docker images older than 4 weeks
  • In Docker, why is it recommended to run `apt-get` update in the Dockerfile?
  • How do I remove old service images after an update?
  • 2 Solutions collect form web for “How to set docker run arguments on marathon spec”

    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.

    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" }
            ]
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.