github.com/caseyhadden/docker@v1.6.2/docs/sources/installation/windows.md (about)

     1  page_title: Installation on Windows
     2  page_description: Docker installation on Microsoft Windows
     3  page_keywords: Docker, Docker documentation, Windows, requirements, virtualbox, boot2docker
     4  
     5  # Windows
     6  > **Note:**
     7  > Docker has been tested on Windows 7.1 and 8; it may also run on older versions.
     8  > Your processor needs to support hardware virtualization.
     9  
    10  The Docker Engine uses Linux-specific kernel features, so to run it on Windows
    11  we need to use a lightweight virtual machine (VM).  You use the **Windows Docker
    12  Client** to control the virtualized Docker Engine to build, run, and manage
    13  Docker containers.
    14  
    15  To make this process easier, we've designed a helper application called
    16  [Boot2Docker](https://github.com/boot2docker/boot2docker) creates a Linux virtual
    17  machine on Windows to run Docker on a Linux operating system.
    18  
    19  Although you will be using Windows Docker client, the docker engine hosting the
    20  containers will still be running on Linux. Until the Docker engine for Windows
    21  is developed, you can launch only Linux containers from your Windows machine.
    22  
    23  ## Demonstration
    24  
    25  <iframe width="640" height="480" src="//www.youtube.com/embed/TjMU3bDX4vo?rel=0" frameborder="0" allowfullscreen></iframe>
    26  
    27  ## Installation
    28  
    29  1. Download the latest release of the
    30     [Docker for Windows Installer](https://github.com/boot2docker/windows-installer/releases/latest).
    31  2. Run the installer, which will install Docker Client or Windows, VirtualBox,
    32     Git for Windows (MSYS-git), the boot2docker Linux ISO, and the Boot2Docker
    33     management tool.
    34     ![](/installation/images/windows-installer.png)
    35  3. Run the **Boot2Docker Start** shortcut from your Desktop or “Program Files →
    36     Boot2Docker for Windows”.
    37     The Start script will ask you to enter an ssh key passphrase - the simplest
    38     (but least secure) is to just hit [Enter].
    39  
    40  4. The **Boot2Docker Start** will start a unix shell already configured to manage
    41     Docker running inside the virtual machine. Run `docker version` to see
    42     if it is working correctly:
    43  
    44  ![](/installation/images/windows-boot2docker-start.png)
    45  
    46  ## Running Docker
    47  
    48  {{ include "no-remote-sudo.md" }}
    49  
    50  **Boot2Docker Start** will automatically start a shell with environment variables
    51  correctly set so you can start using Docker right away:
    52  
    53  Let's try the `hello-world` example image. Run
    54  
    55      $ docker run hello-world
    56  
    57  This should download the very small `hello-world` image and print a
    58  `Hello from Docker.` message.
    59  
    60  ## Using docker from Windows Command Line Prompt (cmd.exe)
    61  
    62  Launch a Windows Command Line Prompt (cmd.exe).
    63  
    64  Boot2Docker command requires `ssh.exe` to be in the PATH, therefore we need to
    65  include `bin` folder of the Git installation (which has ssh.exe) to the `%PATH%`
    66  environment variable by running:
    67  
    68  	set PATH=%PATH%;"c:\Program Files (x86)\Git\bin"
    69  
    70  and then we can run the `boot2docker start` command to start the Boot2Docker VM.
    71  (Run `boot2docker init` command if you get an error saying machine does not
    72  exist.) Then copy the instructions for cmd.exe to set the environment variables
    73  to your console window and you are ready to run docker commands such as
    74  `docker ps`:
    75  
    76  ![](/installation/images/windows-boot2docker-cmd.png)
    77  
    78  ## Using docker from PowerShell
    79  
    80  Launch a PowerShell window, then you need to add `ssh.exe` to your PATH:
    81  
    82  	$Env:Path = "${Env:Path};c:\Program Files (x86)\Git\bin"
    83  
    84  and after running `boot2docker start` command it will print PowerShell commands
    85  to set the environment variables to connect Docker running inside VM. Run these
    86  commands and you are ready to run docker commands such as `docker ps`:
    87  
    88  ![](/installation/images/windows-boot2docker-powershell.png)
    89  
    90  > NOTE: You can alternatively run `boot2docker shellinit | Invoke-Expression`
    91  > command to set the environment variables instead of copying and pasting on
    92  > PowerShell.
    93  
    94  # Further Details
    95  
    96  The Boot2Docker management tool provides several commands:
    97  
    98      $ boot2docker
    99      Usage: boot2docker.exe [<options>] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|ip|shellinit|delete|download|upgrade|version} [<args>]
   100  
   101  ## Upgrading
   102  
   103  1. Download the latest release of the [Docker for Windows Installer](
   104     https://github.com/boot2docker/windows-installer/releases/latest)
   105  
   106  2. Run the installer, which will update the Boot2Docker management tool.
   107  
   108  3. To upgrade your existing virtual machine, open a terminal and run:
   109  
   110          boot2docker stop
   111          boot2docker download
   112          boot2docker start
   113  
   114  ## Container port redirection
   115  
   116  If you are curious, the username for the boot2docker default user is `docker`
   117  and the password is `tcuser`.
   118  
   119  The latest version of `boot2docker` sets up a host only network adaptor which
   120  provides access to the container's ports.
   121  
   122  If you run a container with an exposed port:
   123  
   124      docker run --rm -i -t -p 80:80 nginx
   125  
   126  Then you should be able to access that nginx server using the IP address reported
   127  to you using:
   128  
   129      boot2docker ip
   130  
   131  Typically, it is 192.168.59.103, but it could get changed by Virtualbox's DHCP
   132  implementation.
   133  
   134  For further information or to report issues, please see the [Boot2Docker site](http://boot2docker.io)
   135  
   136  ## Login with PUTTY instead of using the CMD
   137  
   138  Boot2Docker generates and uses the public/private key pair in your `%USERPROFILE%\.ssh`
   139  directory so to log in you need to use the private key from this same directory.
   140  
   141  The private key needs to be converted into the format PuTTY uses.
   142  
   143  You can do this with
   144  [puttygen](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html):
   145  
   146  - Open `puttygen.exe` and load ("File"->"Load" menu) the private key from
   147    `%USERPROFILE%\.ssh\id_boot2docker`
   148  - then click: "Save Private Key".
   149  - Then use the saved file to login with PuTTY using `docker@127.0.0.1:2022`.
   150  
   151  ## References
   152  
   153  If you have Docker hosts running and if you don't wish to do a 
   154  Boot2Docker installation, you can install the docker.exe using
   155  unofficial Windows package manager Chocolately. For information
   156  on how to do this, see [Docker package on Chocolatey](http://chocolatey.org/packages/docker).