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

Merge pull request #6291 from jamtur01/mac

Fixed issues in Mac or Windows
This commit is contained in:
Sven Dowideit 2014-06-08 15:56:52 -07:00
commit 23bdb3b3a6
2 changed files with 32 additions and 50 deletions

View file

@ -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. control the virtualized engine to build, run and manage Docker containers.
To make this process easier we designed a helper application called 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. virtual machine and run the Docker daemon.
## Demonstration ## Demonstration
@ -23,41 +23,40 @@ virtual machine and run the Docker daemon.
1. Download the latest release of the [Docker for OSX Installer]( 1. Download the latest release of the [Docker for OSX Installer](
https://github.com/boot2docker/osx-installer/releases) https://github.com/boot2docker/osx-installer/releases)
2. Run the installer, which will install VirtualBox and the Boot2Docker management 2. Run the installer, which will install VirtualBox and the Boot2Docker management
tool. tool.
![](/installation/images/osx-installer.png) ![](/installation/images/osx-installer.png)
3. Run the `Boot2Docker` app in the `Applications` folder: 3. Run the `Boot2Docker` app in the `Applications` folder:
![](/installation/images/osx-Boot2Docker-Start-app.png) ![](/installation/images/osx-Boot2Docker-Start-app.png)
OR to do it manually, open a terminal and run:
``` 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 $ boot2docker init
(but least secure) is to just hit [Enter]. This passphrase is used by the $ boot2docker start
`boot2docker ssh` command. $ export DOCKER_HOST=tcp://$(boot2docker ip 2>/dev/null):2375
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` Once you have an initialized virtual machine, you can `boot2docker stop`
and `boot2docker start` it. and `boot2docker start` it.
## Upgrading ## Upgrading
To upgrade:
1. Download the latest release of the [Docker for OSX Installer]( 1. Download the latest release of the [Docker for OSX Installer](
https://github.com/boot2docker/osx-installer/releases) https://github.com/boot2docker/osx-installer/releases)
2. Run the installer, which will update VirtualBox and the Boot2Docker management 2. Run the installer, which will update VirtualBox and the Boot2Docker management
tool. tool.
3. To upgrade your existing virtual machine, open a terminal and run: 3. To upgrade your existing virtual machine, open a terminal and run:
``` $ boot2docker stop
boot2docker stop $ boot2docker download
boot2docker download $ boot2docker start
boot2docker start
```
## Running Docker ## 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: 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 Then you should be able to access that Apache server using the IP address reported
to you using: 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. 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: The Boot2Docker management tool provides some commands:
``` $ ./boot2docker
$ ./boot2docker Usage: ./boot2docker [<options>]
Usage: ./boot2docker [<options>] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|delete|download|version}
{help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|delete|download|version}
[<args>]
```
Continue with the [User Guide](/userguide/). Continue with the [User Guide](/userguide/).

View file

@ -9,7 +9,7 @@ is no native Windows Docker client yet, so everything is done inside the virtual
machine. machine.
To make this process easier we designed a helper application called 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. virtual machine and run the Docker daemon.
## Demonstration ## Demonstration
@ -25,26 +25,24 @@ virtual machine and run the Docker daemon.
3. Run the `Boot2Docker Start` shell script from your Desktop or Program Files > Docker. 3. Run the `Boot2Docker Start` shell script from your Desktop or Program Files > Docker.
The Start script will ask you to enter an ssh key passphrase - the simplest The Start script will ask you to enter an ssh key passphrase - the simplest
(but least secure) is to just hit [Enter]. (but least secure) is to just hit [Enter].
![](/installation/images/windows-boot2docker-start.png) ![](/installation/images/windows-boot2docker-start.png)
The `Boot2Docker Start` script will connect you to a shell session in the virtual The `Boot2Docker Start` script will connect you to a shell session in the virtual
Machine. If needed, it will initialise a new VM and start it. machine. If needed, it will initialize a new VM and start it.
## Upgrading ## Upgrading
To upgrade:
1. Download the latest release of the [Docker for Windows Installer]( 1. Download the latest release of the [Docker for Windows Installer](
https://github.com/boot2docker/windows-installer/releases) https://github.com/boot2docker/windows-installer/releases)
2. Run the installer, which will update the Boot2Docker management tool. 2. Run the installer, which will update the Boot2Docker management tool.
3. To upgrade your existing virtual machine, open a terminal and run: 3. To upgrade your existing virtual machine, open a terminal and run:
```
boot2docker stop boot2docker stop
boot2docker download boot2docker download
boot2docker start boot2docker start
```
## Running Docker ## Running Docker
@ -61,10 +59,8 @@ This will download the small busybox image and print hello world.
The Boot2Docker management tool provides some commands: The Boot2Docker management tool provides some commands:
``` $ ./boot2docker
$ ./boot2docker Usage: ./boot2docker [<options>] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|delete|download|version} [<args>]
Usage: ./boot2docker [<options>] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|delete|download|version} [<args>]
```
## Container port redirection ## Container port redirection
@ -74,16 +70,12 @@ network adaptor to which the container's ports will be exposed on.
If you run a container with an exposed port: 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 Then you should be able to access that Apache server using the IP address reported
to you using: 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. Typically, it is 192.168.59.103, but at this point it can change.
@ -91,6 +83,4 @@ If you want to share container ports with other computers on your LAN, you will
need to set up [NAT adaptor based port forwarding]( need to set up [NAT adaptor based port forwarding](
https://github.com/boot2docker/boot2docker/blob/master/doc/WORKAROUNDS.md) 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) For further information or to report issues, please see the [Boot2Docker site](http://boot2docker.io)