|
@@ -12,7 +12,7 @@ using a lightweight virtual machine. You can use the OS X Docker client to
|
|
|
control the virtualized engine to build, run and manage Docker containers.
|
|
|
|
|
|
To make this process easier we designed a helper application called
|
|
|
-[boot2docker](https://github.com/boot2docker/boot2docker) to install the
|
|
|
+[Boot2Docker](https://github.com/boot2docker/boot2docker) to install the
|
|
|
virtual machine and run the Docker daemon.
|
|
|
|
|
|
## Demonstration
|
|
@@ -23,41 +23,40 @@ virtual machine and run the Docker daemon.
|
|
|
|
|
|
1. Download the latest release of the [Docker for OSX Installer](
|
|
|
https://github.com/boot2docker/osx-installer/releases)
|
|
|
+
|
|
|
2. Run the installer, which will install VirtualBox and the Boot2Docker management
|
|
|
tool.
|
|
|

|
|
|
+
|
|
|
3. Run the `Boot2Docker` app in the `Applications` folder:
|
|
|

|
|
|
- OR to do it manually, open a terminal and run:
|
|
|
|
|
|
-```
|
|
|
- boot2docker init
|
|
|
- boot2docker start
|
|
|
- export DOCKER_HOST=tcp://$(boot2docker ip 2>/dev/null):2375
|
|
|
-```
|
|
|
+ Or to initiate Boot2Docker manually, open a terminal and run:
|
|
|
+
|
|
|
+ $ boot2docker init
|
|
|
+ $ boot2docker start
|
|
|
+ $ export DOCKER_HOST=tcp://$(boot2docker ip 2>/dev/null):2375
|
|
|
|
|
|
-`boot2docker init` will ask you to enter an ssh key passphrase - the simplest
|
|
|
-(but least secure) is to just hit [Enter]. This passphrase is used by the
|
|
|
-`boot2docker ssh` command.
|
|
|
+ The `boot2docker init` command will ask you to enter an SSH key passphrase - the simplest
|
|
|
+ (but least secure) is to just hit [Enter]. This passphrase is used by the
|
|
|
+ `boot2docker ssh` command.
|
|
|
|
|
|
Once you have an initialized virtual machine, you can `boot2docker stop`
|
|
|
and `boot2docker start` it.
|
|
|
|
|
|
## Upgrading
|
|
|
|
|
|
-To upgrade:
|
|
|
-
|
|
|
1. Download the latest release of the [Docker for OSX Installer](
|
|
|
https://github.com/boot2docker/osx-installer/releases)
|
|
|
+
|
|
|
2. Run the installer, which will update VirtualBox and the Boot2Docker management
|
|
|
tool.
|
|
|
+
|
|
|
3. To upgrade your existing virtual machine, open a terminal and run:
|
|
|
|
|
|
-```
|
|
|
- boot2docker stop
|
|
|
- boot2docker download
|
|
|
- boot2docker start
|
|
|
-```
|
|
|
+ $ boot2docker stop
|
|
|
+ $ boot2docker download
|
|
|
+ $ boot2docker start
|
|
|
|
|
|
## Running Docker
|
|
|
|
|
@@ -75,16 +74,12 @@ network adapter 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
|
|
|
-```
|
|
|
+ $ 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
|
|
|
-```
|
|
|
+ $ boot2docker ssh ip addr show dev eth1
|
|
|
|
|
|
Typically, it is 192.168.59.103, but at this point it can change.
|
|
|
|
|
@@ -96,12 +91,9 @@ https://github.com/boot2docker/boot2docker/blob/master/doc/WORKAROUNDS.md)
|
|
|
|
|
|
The Boot2Docker management tool provides some commands:
|
|
|
|
|
|
-```
|
|
|
-$ ./boot2docker
|
|
|
-Usage: ./boot2docker [<options>]
|
|
|
-{help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|delete|download|version}
|
|
|
-[<args>]
|
|
|
-```
|
|
|
+ $ ./boot2docker
|
|
|
+ Usage: ./boot2docker [<options>]
|
|
|
+ {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|delete|download|version}
|
|
|
|
|
|
Continue with the [User Guide](/userguide/).
|
|
|
|