Thank you On Tue, Dec 22, 2015 at 5:11 AM, Adam Bordelon <[email protected]> wrote:
> Viktor, you are correct that Mesos' DockerInfo doesn't have explicit > support for the ip:hostPort:containerPort format, but you can use the > DockerInfo.parameters field to pass arbitrary parameters to the docker > CLI. > https://github.com/apache/mesos/blob/0.26.0/include/mesos/mesos.proto#L1482 > "parameters": "-p 192.168.99.100:8080:8080/tcp" > > On Mon, Dec 21, 2015 at 1:35 AM, Viktor Sadovnikov <[email protected]> > wrote: > > 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 > >> >
