2014-04-15 20:53:12 -04:00
|
|
|
page_title: Installation on Windows
|
2014-05-25 21:52:57 -04:00
|
|
|
page_description: Docker installation on Microsoft Windows
|
2014-04-15 20:53:12 -04:00
|
|
|
page_keywords: Docker, Docker documentation, Windows, requirements, virtualbox, boot2docker
|
|
|
|
|
|
|
|
# Windows
|
2014-06-08 20:36:49 -04:00
|
|
|
> **Note:**
|
|
|
|
> Docker has been tested on Windows 7.1 and 8; it may also run on older versions.
|
2014-06-21 17:12:10 -04:00
|
|
|
> Your processor needs to support hardware virtualization.
|
2014-05-25 21:52:57 -04:00
|
|
|
|
2014-06-09 05:23:54 -04:00
|
|
|
The Docker Engine uses Linux-specific kernel features, so to run it on Windows
|
|
|
|
we need to use a lightweight virtual machine (vm). You use the Windows Docker client to
|
2014-06-08 20:36:49 -04:00
|
|
|
control the virtualized Docker Engine to build, run, and manage Docker containers.
|
|
|
|
|
|
|
|
To make this process easier, we've designed a helper application called
|
|
|
|
[Boot2Docker](https://github.com/boot2docker/boot2docker) that installs the
|
|
|
|
virtual machine and runs the Docker daemon.
|
2014-05-25 21:52:57 -04:00
|
|
|
|
2014-06-08 16:11:50 -04:00
|
|
|
## Demonstration
|
|
|
|
|
|
|
|
<iframe width="640" height="480" src="//www.youtube.com/embed/oSHN8_uiZd4?rel=0" frameborder="0" allowfullscreen></iframe>
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-05-25 21:52:57 -04:00
|
|
|
## Installation
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-05-25 21:52:57 -04:00
|
|
|
1. Download the latest release of the [Docker for Windows Installer](https://github.com/boot2docker/windows-installer/releases)
|
2014-06-08 20:36:49 -04:00
|
|
|
2. Run the installer, which will install VirtualBox, MSYS-git, the boot2docker Linux ISO,
|
|
|
|
and the Boot2Docker management tool.
|
2014-05-25 21:52:57 -04:00
|
|
|
![](/installation/images/windows-installer.png)
|
2014-06-20 03:23:35 -04:00
|
|
|
3. Run the `Boot2Docker Start` shell script from your Desktop or Program Files > Boot2Docker for Windows.
|
2014-05-25 21:52:57 -04:00
|
|
|
The Start script will ask you to enter an ssh key passphrase - the simplest
|
|
|
|
(but least secure) is to just hit [Enter].
|
2014-06-08 18:53:20 -04:00
|
|
|
|
2014-05-25 21:52:57 -04:00
|
|
|
![](/installation/images/windows-boot2docker-start.png)
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-06-08 18:53:20 -04:00
|
|
|
The `Boot2Docker Start` script will connect you to a shell session in the virtual
|
|
|
|
machine. If needed, it will initialize a new VM and start it.
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-05-25 21:52:57 -04:00
|
|
|
## Upgrading
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-05-25 21:52:57 -04:00
|
|
|
1. Download the latest release of the [Docker for Windows Installer](
|
|
|
|
https://github.com/boot2docker/windows-installer/releases)
|
2014-06-08 18:53:20 -04:00
|
|
|
|
2014-05-25 21:52:57 -04:00
|
|
|
2. Run the installer, which will update the Boot2Docker management tool.
|
2014-06-08 18:53:20 -04:00
|
|
|
|
2014-05-25 21:52:57 -04:00
|
|
|
3. To upgrade your existing virtual machine, open a terminal and run:
|
2014-06-08 18:53:20 -04:00
|
|
|
|
2014-05-25 21:52:57 -04:00
|
|
|
boot2docker stop
|
|
|
|
boot2docker download
|
|
|
|
boot2docker start
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
## Running Docker
|
|
|
|
|
2014-06-08 20:36:49 -04:00
|
|
|
Boot2Docker will log you in automatically so you can start using Docker right away.
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-07-15 00:02:12 -04:00
|
|
|
Let's try the `hello-world` example image. Run
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-07-15 00:02:12 -04:00
|
|
|
$ docker run hello-world
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-07-15 00:02:12 -04:00
|
|
|
This should download the very small `hello-world` image and print a `Hello from Docker.` message.
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-06-08 19:02:57 -04:00
|
|
|
|
2014-05-25 21:52:57 -04:00
|
|
|
# Further Details
|
2014-05-21 04:29:24 -04:00
|
|
|
|
2014-06-08 20:36:49 -04:00
|
|
|
The Boot2Docker management tool provides several commands:
|
2014-05-21 04:29:24 -04:00
|
|
|
|
2014-06-08 18:53:20 -04:00
|
|
|
$ ./boot2docker
|
2014-06-19 07:00:45 -04:00
|
|
|
Usage: ./boot2docker [<options>] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|ip|delete|download|version} [<args>]
|
2014-05-21 04:29:24 -04:00
|
|
|
|
2014-05-28 00:42:19 -04:00
|
|
|
|
2014-06-08 19:02:57 -04:00
|
|
|
## Container port redirection
|
|
|
|
|
2014-06-13 18:38:45 -04:00
|
|
|
If you are curious, the username for the boot2docker default user is `docker` and the password is `tcuser`.
|
|
|
|
|
2014-06-08 20:36:49 -04:00
|
|
|
The latest version of `boot2docker` sets up a host only network adaptor which provides access to the container's ports.
|
2014-05-28 00:42:19 -04:00
|
|
|
|
|
|
|
If you run a container with an exposed port:
|
|
|
|
|
2014-06-12 21:24:09 -04:00
|
|
|
docker run --rm -i -t -p 80:80 nginx
|
2014-05-28 00:42:19 -04:00
|
|
|
|
2014-06-12 21:24:09 -04:00
|
|
|
Then you should be able to access that nginx server using the IP address reported
|
2014-05-28 00:42:19 -04:00
|
|
|
to you using:
|
|
|
|
|
2014-06-08 19:02:57 -04:00
|
|
|
boot2docker ip
|
2014-05-28 00:42:19 -04:00
|
|
|
|
2014-06-08 20:36:49 -04:00
|
|
|
Typically, it is 192.168.59.103, but it could get changed by Virtualbox's DHCP
|
|
|
|
implementation.
|
2014-05-28 00:42:19 -04:00
|
|
|
|
2014-05-25 21:52:57 -04:00
|
|
|
For further information or to report issues, please see the [Boot2Docker site](http://boot2docker.io)
|