Add indication to use docker create/run on port mapping #11420 (#11429)

* 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:
Maximillian Xavier 2020-09-29 13:24:19 -03:00 committed by GitHub
parent 128a734891
commit d7b00e2bd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -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