mirror of https://github.com/docker/docs.git
* Add indication to use docker create/run on port mapping #11420 Co-authored-by: Sebastiaan van Stijn <thaJeztah@users.noreply.github.com> Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com> Signed-off-by: Maximillian Fan Xavier <maximillianfx@gmail.com>
This commit is contained in:
parent
128a734891
commit
d7b00e2bd1
|
@ -19,7 +19,11 @@ point of view of the container.
|
|||
|
||||
## Published ports
|
||||
|
||||
By default, when you create a container, it does not publish any of its ports
|
||||
By default, when you create or run a container using `docker create` or `docker run`,
|
||||
it does not publish any of its ports to the outside world. To make a port available
|
||||
to services outside of Docker, or to Docker containers which are not connected to
|
||||
the container's network, use the `--publish` or `-p` flag. This creates a firewall
|
||||
rule which maps a container port to a port on the Docker host. Here are some examples.
|
||||
to the outside world. To make a port available to services outside of Docker, or
|
||||
to Docker containers which are not connected to the container's network, use the
|
||||
`--publish` or `-p` flag. This creates a firewall rule which maps a container
|
||||
|
|
Loading…
Reference in New Issue