From 23dd221e5250398d4120a1f3d1bcb591923f4892 Mon Sep 17 00:00:00 2001 From: SvenDowideit Date: Wed, 28 May 2014 14:42:19 +1000 Subject: [PATCH] sync the initial docs from b2d Docker-DCO-1.1-Signed-off-by: SvenDowideit (github: SvenDowideit) --- docs/sources/installation/mac.md | 26 ++++++++++++++++++++++++++ docs/sources/installation/windows.md | 26 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/docs/sources/installation/mac.md b/docs/sources/installation/mac.md index 9b8acc70ee..ef91081a53 100644 --- a/docs/sources/installation/mac.md +++ b/docs/sources/installation/mac.md @@ -78,5 +78,31 @@ $ ./boot2docker Usage: ./boot2docker [] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|delete|download|version} [] ``` +## 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). diff --git a/docs/sources/installation/windows.md b/docs/sources/installation/windows.md index 2980cad147..a736114296 100644 --- a/docs/sources/installation/windows.md +++ b/docs/sources/installation/windows.md @@ -69,5 +69,31 @@ $ ./boot2docker Usage: ./boot2docker [] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|delete|download|version} [] ``` +## 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)