Hello, Apparently Marathon does not support portMapping with host IP address either.
Fragment from https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps "portMappings": [ { "containerPort": 8080, "hostPort": 0, "servicePort": 9000, "protocol": "tcp" }, { "containerPort": 161, "hostPort": 0, "protocol": "udp" } ], Therefore, if my host has several IP addresses, setting up mapping on a port (for example, 8080) for one container blocks results in "0.0.0.0:8080->8080/tcp" and this blocks creation of other containers with mapping on the same port (but different IP address). My expectation is that specifying IP address will result in "192.168.99.100:8080->8080/tcp", and this will not block creation of other containers. I will very appreciate if somebody can share how to setup such mapping using Mesos Proto. With regards, Viktor On Sun, Dec 20, 2015 at 10:35 AM, tommy xiao <[email protected]> wrote: > see marathon implementation? > > 2015-12-19 22:49 GMT+08:00 Viktor Sadovnikov <[email protected]>: > > > Hi, > > > > Do I understand correctly that currently > > ContainerInfo.DockerInfo.DockerInfo of > > Mesos Proto ( > > > > > https://github.com/apache/mesos/blob/f9f379ddc315fb07e9862238dbe6e83988ac66c6/include/mesos/mesos.proto > > ) > > lacks IP address field in order to support ip:hostPort:containerPort > format > > of port mappings, which is available in "docker run" command > > https://docs.docker.com/engine/reference/run/ ? > > > > This seems to be the missing element, which would allow redirecting > > requests coming to a particular IP address of the host to the container. > If > > I'm wrong, how can I setup such mapping programatically? > > > > Thank you in advance, > > Viktor > > > > > > -- > Deshi Xiao > Twitter: xds2000 > E-mail: xiaods(AT)gmail.com >
