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?

  • Docker Debian install fails
  • Connecting to an H2 Database in a Docker Container
  • I want to create a Docker image which contains Java and PostgreSQL. I just want to create an Image to reuse it from anywhere
  • Manually running container exists with code 145
  • How to setup ASP.NET Web Application with Docker container
  • NPM install via git+https//x-oauth-basic within Docker container fails
  • Docker OSX port mapping error when run: exec
  • localhost within docker user defined network?
  • Handling multiple persistant volumes for a Rethinkdb Docker Swarm
  • Docker container with Newrelic Python agent and Supervisord is not sending data
  • How to run install pip requirements from private repo in google cloud source?
  • cron on a docker container for laravel not working
  • 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.