- the -add-host option in the Marathon dock application

I have docker images (with entry points) that I would like to run using Mesos and Marathon. These images require changes to / etc / hosts and / etc / resolv.conf. When I usually run this, I would do something like:

docker run --add-host host:ip --dns-search url image 

but in the application for the marathon (which I configure as the json body to send to the marathon), I have no idea what these parameters will be bound to. For example, -p becomes portMappings in the json body. Does anyone know what --add-host and --dns-search and potentially other options mean?

+7
json docker mesos hosts marathon
source share
1 answer

You can pass them to parameters as follows:

 "container": { "type": "DOCKER", "docker": { "network": "HOST", "image": "your/image", "parameters": [ { "key": "add-host", "value": "host:ip" }, { "key": "dns-search", "value": "url" } ] } } 

For more details see here , the section "Privileged mode and arbitrary docker settings".

+8
source share

All Articles