Say you had two network interfaces with different IPs. you can bind to both `docker run -p 10.0.0.1:80:80 -p 10.0.0.2:80:80 -d nginx` and then you will have 2 values in the array.
On Tuesday, April 26, 2016 at 9:29:15 PM UTC-4, Himanshu Raj wrote: > > Hi Folks, > > From Docker API documentation of list_containers ( > https://docs.docker.com/engine/reference/api/docker_remote_api_v1.15/#list-containers), > > in the following section: > Inspect a container > > GET /containers/(id or name)/json > > Return low-level information on the container id > > *Example request*: > > GET /containers/4fa6e0f0c678/json HTTP/1.1 > > ... > > "PortBindings": { > "80/tcp": [ > { > "HostIp": "0.0.0.0", > "HostPort": "49153" > } > ] > }, > > > > I see that portbinding is an array (e.g., in case above, "80/tcp" can have > multiple HostIp, HostPort tuples in there). Can someone pls give an example > where multiple of these would make sense? Is it possible to bind a > container port on different interfaceIP:port combinations? > > Thanks and best regards, > -- > -Himanshu > -- You received this message because you are subscribed to the Google Groups "docker-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to docker-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.