Windows users use Docker Toolbox to install Docker software. Docker Toolbox includes the following Docker tools:
Because the Docker Engine daemon uses Linux-specific kernel features, you can’t run Docker Engine natively in Windows. Instead, you must use the Docker Machine command,
docker-machine, to create and attach to a small Linux VM on your machine. This VM hosts Docker Engine for you on your Windows system.
To run Docker, your machine must have a 64-bit operating system running Windows 7 or higher. Additionally, you must make sure that virtualization is enabled on your machine. To verify your machine meets these requirements, do the following:
If you aren’t using a supported version, you could consider upgrading your operating system.
If you have a newer system, specifically 64bit Windows 10 Pro, with Enterprise and Education (1511 November update, Build 10586 or later), consider using Docker for Windows instead. It runs natively on the Windows, so there is no need for a pre-configured Docker QuickStart shell. It also uses Hyper-V for virtualization, so the instructions below for checking virtualization will be out of date for newer Windows systems. Full install prerequisites are provided in the Docker for Windows topic in What to know before you install.
Choose Start > Task Manager and navigate to the Performance tab. Under CPU you should see the following:
If virtualization is not enabled on your system, follow the manufacturer’s instructions for enabling it.
Run the Microsoft® Hardware-Assisted Virtualization Detection Tool and follow the on-screen instructions.
How you do this verification depends on your Windows version. For details, see the Windows article How to determine whether a computer is running a 32-bit version or 64-bit version of the Windows operating system.
In this section, you install the Docker Toolbox software and several “helper” applications. The installation adds the following software to your machine:
If you have a previous version of VirtualBox installed, do not reinstall it with the Docker Toolbox installer. When prompted, uncheck it.
If you have Virtual Box running, you must shut it down before running the installer.
The installer launches the “Setup – Docker Toolbox” dialog.
If Windows security dialog prompts you to allow the program to make a change, choose Yes. The system displays the Setup – Docker Toolbox for Windowswizard.
Accept all the installer defaults. The installer takes a few minutes to install all the components:
When it completes, the installer reports it was successful:
The installer places Docker Toolbox and VirtualBox in your Applications folder. In this step, you start Docker Toolbox and run a simple Docker command.
If the system displays a User Account Control prompt to allow VirtualBox to make changes to your computer. Choose Yes.
The terminal does several things to set up Docker Toolbox for you. When it is done, the terminal displays the
The terminal runs a special
bash environment instead of the standard Windows command prompt. The
bash environment is required by Docker.
If you aren’t familiar with a terminal window, here are some quick tips.
The prompt is traditionally a
$ dollar sign. You type commands into the command line which is the area after the prompt. Your cursor is indicated by a highlighted area or a
| that appears in the command line. After typing a command, always press RETURN.
docker run hello-worldcommand and press RETURN.
The command does some work for you, if everything runs well, the command’s output looks like this:
$ docker run hello-world
Unable to find image <span class="hljs-string">'hello-world:latest'</span> locally
Pulling repository hello-world
<span class="hljs-number">91</span>c95931e552: Download complete
a8219747be10: Download complete
Status: Downloaded newer image <span class="hljs-keyword">for</span> hello-world:latest
Hello <span class="hljs-keyword">from</span> Docker.
This message shows that your installation appears to be working correctly.
To generate <span class="hljs-keyword">this</span> message, Docker took the following steps:
<span class="hljs-number">1.</span> The Docker Engine CLI client contacted the Docker Engine daemon.
<span class="hljs-number">2.</span> The Docker Engine daemon pulled the <span class="hljs-string">"hello-world"</span> image <span class="hljs-keyword">from</span> the Docker Hub.
(Assuming it was not already locally available.)
<span class="hljs-number">3.</span> The Docker Engine daemon created a <span class="hljs-keyword">new</span> container <span class="hljs-keyword">from</span> that image which runs the
executable that produces the output you are currently reading.
<span class="hljs-number">4.</span> The Docker Engine daemon streamed that output to the Docker Engine CLI client, which sent it
to your terminal.
To <span class="hljs-keyword">try</span> something more ambitious, you can run an Ubuntu container <span class="hljs-keyword">with</span>:
$ docker run -it ubuntu bash
For more examples and ideas, visit: