1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #6073 from SvenDowideit/b2d-port-redirection-docs

sync the initial port redirection docs from b2d
This commit is contained in:
O.S. Tezer 2014-05-31 13:58:28 -07:00
commit b51802a47c
2 changed files with 52 additions and 0 deletions

View file

@ -78,5 +78,31 @@ $ ./boot2docker
Usage: ./boot2docker [<options>] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|delete|download|version} [<args>]
```
## Container port redirection
The latest version of `boot2docker` sets up two network adaptors: one using NAT
to allow the VM to download images and files from the Internet, and one host only
network adaptor to which the container's ports will be exposed on.
If you run a container with an exposed port:
```
docker run --rm -i -t -p 80:80 apache
```
Then you should be able to access that Apache server using the IP address reported
to you using:
```
boot2docker ssh ip addr show dev eth1
```
Typically, it is 192.168.59.103, but at this point it can change.
If you want to share container ports with other computers on your LAN, you will
need to set up [NAT adaptor based port forwarding](
https://github.com/boot2docker/boot2docker/blob/master/doc/WORKAROUNDS.md)
For further information or to report issues, please see the [Boot2Docker site](http://boot2docker.io).

View file

@ -69,5 +69,31 @@ $ ./boot2docker
Usage: ./boot2docker [<options>] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|delete|download|version} [<args>]
```
## Container port redirection
The latest version of `boot2docker` sets up two network adaptors: one using NAT
to allow the VM to download images and files from the Internet, and one host only
network adaptor to which the container's ports will be exposed on.
If you run a container with an exposed port:
```
docker run --rm -i -t -p 80:80 apache
```
Then you should be able to access that Apache server using the IP address reported
to you using:
```
boot2docker ssh ip addr show dev eth1
```
Typically, it is 192.168.59.103, but at this point it can change.
If you want to share container ports with other computers on your LAN, you will
need to set up [NAT adaptor based port forwarding](
https://github.com/boot2docker/boot2docker/blob/master/doc/WORKAROUNDS.md)
For further information or to report issues, please see the [Boot2Docker site](http://boot2docker.io)