Docker Community Forums

Share and learn in the Docker community.

Docker 1.13 --publish syntax for docker service create

The 1.13 documentation has the following example:

$ docker service create \
  --mode global \
  --mount type=bind,source=/,destination=/rootfs,ro=1 \
  --mount type=bind,source=/var/run,destination=/var/run \
  --mount type=bind,source=/sys,destination=/sys,ro=1 \
  --mount type=bind,source=/var/lib/docker/,destination=/var/lib/docker,ro=1 \
  --publish mode=host,target=8080,published=8080 \
  --name=cadvisor \
  google/cadvisor:latest

What is the full syntax for the --publish option? Can I specify a host IP or a network interface?