mirror of https://github.com/docker/cli.git
commit
2813fae8f9
|
@ -343,12 +343,12 @@ $ docker run -t -i --mount type=bind,src=/data,dst=/data busybox sh
|
||||||
### Publish or expose port (-p, --expose)
|
### Publish or expose port (-p, --expose)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker run -p 127.0.0.1:80:8080 ubuntu bash
|
$ docker run -p 127.0.0.1:80:8080/tcp ubuntu bash
|
||||||
```
|
```
|
||||||
|
|
||||||
This binds port `8080` of the container to port `80` on `127.0.0.1` of the host
|
This binds port `8080` of the container to TCP port `80` on `127.0.0.1` of the host
|
||||||
machine. The [Docker User
|
machine. You can also specify `udp` and `sctp` ports.
|
||||||
Guide](https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/)
|
The [Docker User Guide](https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/)
|
||||||
explains in detail how to manipulate ports in Docker.
|
explains in detail how to manipulate ports in Docker.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -813,7 +813,7 @@ The options you can specify are:
|
||||||
<td><tt>--publish 8080:80/tcp</tt></td>
|
<td><tt>--publish 8080:80/tcp</tt></td>
|
||||||
<td><tt>--publish published=8080,target=80,protocol=tcp</tt></td>
|
<td><tt>--publish published=8080,target=80,protocol=tcp</tt></td>
|
||||||
<td><p>
|
<td><p>
|
||||||
The protocol to use, either <tt>tcp</tt> or <tt>udp</tt> Defaults to
|
The protocol to use, <tt>tcp</tt> , <tt>udp</tt>, or <tt>sctp</tt>. Defaults to
|
||||||
<tt>tcp</tt>. To bind a port for both protocols, specify the <tt>-p</tt> or
|
<tt>tcp</tt>. To bind a port for both protocols, specify the <tt>-p</tt> or
|
||||||
<tt>--publish</tt> flag twice.
|
<tt>--publish</tt> flag twice.
|
||||||
</p></td>
|
</p></td>
|
||||||
|
|
Loading…
Reference in New Issue