I have docker images (with entrypoints) that I would like to run using Mesos and Marathon. These images require changes in /etc/hosts and /etc/resolv.conf. When I typically run this I would do something like:
docker run --add-host host:ip --dns-search url image
but in a marathon application (which i'm setting up as a json body to be sent to marathon), I have no idea what these options would be mapped to. For instance -p
becomes portMappings
in the json body. Does anybody know what the --add-host
and --dns-search
and potentially other options would become?
You may pass them in parameters
like that:
"container": {
"type": "DOCKER",
"docker": {
"network": "HOST",
"image": "your/image",
"parameters": [
{ "key": "add-host", "value": "host:ip" },
{ "key": "dns-search", "value": "url" }
]
}
}
Refer here, "Privileged Mode and Arbitrary Docker Options" section for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With