Docker + Marathon : how to do a port mapping ? Docker + Marathon : how to do a port mapping ? docker docker

Docker + Marathon : how to do a port mapping ?


The port mapping is (as with Docker) only relevant for BRIDGE networking mode, see also the Marathon doc. In your case the following should work:

..."container": {  "type": "DOCKER",  "docker": {    "network": "BRIDGE",    "portMappings": [      {        "protocol": "tcp",        "containerPort": 8787,        "hostPort": 8787      }    ]  }},...

Mesosphere doc