|
@@ -2,20 +2,20 @@
|
|
:description: Docker's tutorial to run docker on Windows
|
|
:description: Docker's tutorial to run docker on Windows
|
|
:keywords: Docker, Docker documentation, Windows, requirements, virtualbox, vagrant, git, ssh, putty, cygwin
|
|
:keywords: Docker, Docker documentation, Windows, requirements, virtualbox, vagrant, git, ssh, putty, cygwin
|
|
|
|
|
|
-**Vagrant installation is temporarily out of date, it will be updated for 0.6 soon.**
|
|
|
|
-
|
|
|
|
.. _windows:
|
|
.. _windows:
|
|
|
|
|
|
Using Vagrant (Windows)
|
|
Using Vagrant (Windows)
|
|
=======================
|
|
=======================
|
|
|
|
|
|
- Please note this is a community contributed installation path. The only 'official' installation is using the :ref:`ubuntu_linux` installation path. This version
|
|
|
|
- may be out of date because it depends on some binaries to be updated and published
|
|
|
|
|
|
+Docker can run on Windows using a VM like VirtualBox. You then run
|
|
|
|
+Linux within the VM.
|
|
|
|
|
|
|
|
+Installation
|
|
|
|
+------------
|
|
|
|
|
|
|
|
+.. include:: install_header.inc
|
|
|
|
|
|
-Requirements
|
|
|
|
-------------
|
|
|
|
|
|
+.. include:: install_unofficial.inc
|
|
|
|
|
|
1. Install virtualbox from https://www.virtualbox.org - or follow this tutorial__
|
|
1. Install virtualbox from https://www.virtualbox.org - or follow this tutorial__
|
|
|
|
|
|
@@ -35,7 +35,10 @@ We recommend having at least 2Gb of free disk space and 2Gb of RAM (or more).
|
|
Opening a command prompt
|
|
Opening a command prompt
|
|
------------------------
|
|
------------------------
|
|
|
|
|
|
-First open a cmd prompt. Press Windows key and then press “R” key. This will open the RUN dialog box for you. Type “cmd” and press Enter. Or you can click on Start, type “cmd” in the “Search programs and files” field, and click on cmd.exe.
|
|
|
|
|
|
+First open a cmd prompt. Press Windows key and then press “R”
|
|
|
|
+key. This will open the RUN dialog box for you. Type “cmd” and press
|
|
|
|
+Enter. Or you can click on Start, type “cmd” in the “Search programs
|
|
|
|
+and files” field, and click on cmd.exe.
|
|
|
|
|
|
.. image:: images/win/_01.gif
|
|
.. image:: images/win/_01.gif
|
|
:alt: Git install
|
|
:alt: Git install
|
|
@@ -47,14 +50,17 @@ This should open a cmd prompt window.
|
|
:alt: run docker
|
|
:alt: run docker
|
|
:align: center
|
|
:align: center
|
|
|
|
|
|
-Alternatively, you can also use a Cygwin terminal, or Git Bash (or any other command line program you are usually using). The next steps would be the same.
|
|
|
|
|
|
+Alternatively, you can also use a Cygwin terminal, or Git Bash (or any
|
|
|
|
+other command line program you are usually using). The next steps
|
|
|
|
+would be the same.
|
|
|
|
|
|
.. _launch_ubuntu:
|
|
.. _launch_ubuntu:
|
|
|
|
|
|
Launch an Ubuntu virtual server
|
|
Launch an Ubuntu virtual server
|
|
-------------------------------
|
|
-------------------------------
|
|
|
|
|
|
-Let’s download and run an Ubuntu image with docker binaries already installed.
|
|
|
|
|
|
+Let’s download and run an Ubuntu image with docker binaries already
|
|
|
|
+installed.
|
|
|
|
|
|
.. code-block:: bash
|
|
.. code-block:: bash
|
|
|
|
|
|
@@ -66,7 +72,9 @@ Let’s download and run an Ubuntu image with docker binaries already installed.
|
|
:alt: run docker
|
|
:alt: run docker
|
|
:align: center
|
|
:align: center
|
|
|
|
|
|
-Congratulations! You are running an Ubuntu server with docker installed on it. You do not see it though, because it is running in the background.
|
|
|
|
|
|
+Congratulations! You are running an Ubuntu server with docker
|
|
|
|
+installed on it. You do not see it though, because it is running in
|
|
|
|
+the background.
|
|
|
|
|
|
Log onto your Ubuntu server
|
|
Log onto your Ubuntu server
|
|
---------------------------
|
|
---------------------------
|
|
@@ -85,7 +93,12 @@ Run the following command
|
|
|
|
|
|
vagrant ssh
|
|
vagrant ssh
|
|
|
|
|
|
-You may see an error message starting with “`ssh` executable not found”. In this case it means that you do not have SSH in your PATH. If you do not have SSH in your PATH you can set it up with the “set” command. For instance, if your ssh.exe is in the folder named “C:\Program Files (x86)\Git\bin”, then you can run the following command:
|
|
|
|
|
|
+You may see an error message starting with “`ssh` executable not
|
|
|
|
+found”. In this case it means that you do not have SSH in your
|
|
|
|
+PATH. If you do not have SSH in your PATH you can set it up with the
|
|
|
|
+“set” command. For instance, if your ssh.exe is in the folder named
|
|
|
|
+“C:\Program Files (x86)\Git\bin”, then you can run the following
|
|
|
|
+command:
|
|
|
|
|
|
.. code-block:: bash
|
|
.. code-block:: bash
|
|
|
|
|
|
@@ -104,13 +117,16 @@ First step is to get the IP and port of your Ubuntu server. Simply run:
|
|
|
|
|
|
vagrant ssh-config
|
|
vagrant ssh-config
|
|
|
|
|
|
-You should see an output with HostName and Port information. In this example, HostName is 127.0.0.1 and port is 2222. And the User is “vagrant”. The password is not shown, but it is also “vagrant”.
|
|
|
|
|
|
+You should see an output with HostName and Port information. In this
|
|
|
|
+example, HostName is 127.0.0.1 and port is 2222. And the User is
|
|
|
|
+“vagrant”. The password is not shown, but it is also “vagrant”.
|
|
|
|
|
|
.. image:: images/win/ssh-config.gif
|
|
.. image:: images/win/ssh-config.gif
|
|
:alt: run docker
|
|
:alt: run docker
|
|
:align: center
|
|
:align: center
|
|
|
|
|
|
-You can now use this information for connecting via SSH to your server. To do so you can:
|
|
|
|
|
|
+You can now use this information for connecting via SSH to your
|
|
|
|
+server. To do so you can:
|
|
|
|
|
|
- Use putty.exe OR
|
|
- Use putty.exe OR
|
|
- Use SSH from a terminal
|
|
- Use SSH from a terminal
|
|
@@ -118,8 +134,9 @@ You can now use this information for connecting via SSH to your server. To do so
|
|
Use putty.exe
|
|
Use putty.exe
|
|
'''''''''''''
|
|
'''''''''''''
|
|
|
|
|
|
-You can download putty.exe from this page http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
|
|
|
|
-Launch putty.exe and simply enter the information you got from last step.
|
|
|
|
|
|
+You can download putty.exe from this page
|
|
|
|
+http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Launch
|
|
|
|
+putty.exe and simply enter the information you got from last step.
|
|
|
|
|
|
.. image:: images/win/putty.gif
|
|
.. image:: images/win/putty.gif
|
|
:alt: run docker
|
|
:alt: run docker
|
|
@@ -134,7 +151,9 @@ Open, and enter user = vagrant and password = vagrant.
|
|
SSH from a terminal
|
|
SSH from a terminal
|
|
'''''''''''''''''''
|
|
'''''''''''''''''''
|
|
|
|
|
|
-You can also run this command on your favorite terminal (windows prompt, cygwin, git-bash, …). Make sure to adapt the IP and port from what you got from the vagrant ssh-config command.
|
|
|
|
|
|
+You can also run this command on your favorite terminal (windows
|
|
|
|
+prompt, cygwin, git-bash, …). Make sure to adapt the IP and port from
|
|
|
|
+what you got from the vagrant ssh-config command.
|
|
|
|
|
|
.. code-block:: bash
|
|
.. code-block:: bash
|
|
|
|
|
|
@@ -146,12 +165,14 @@ Enter user = vagrant and password = vagrant.
|
|
:alt: run docker
|
|
:alt: run docker
|
|
:align: center
|
|
:align: center
|
|
|
|
|
|
-Congratulations, you are now logged onto your Ubuntu Server, running on top of your Windows machine !
|
|
|
|
|
|
+Congratulations, you are now logged onto your Ubuntu Server, running
|
|
|
|
+on top of your Windows machine !
|
|
|
|
|
|
Running Docker
|
|
Running Docker
|
|
--------------
|
|
--------------
|
|
|
|
|
|
-First you have to be root in order to run docker. Simply run the following command:
|
|
|
|
|
|
+First you have to be root in order to run docker. Simply run the
|
|
|
|
+following command:
|
|
|
|
|
|
.. code-block:: bash
|
|
.. code-block:: bash
|
|
|
|
|
|
@@ -179,10 +200,11 @@ VM does not boot
|
|
|
|
|
|
.. image:: images/win/ts_go_bios.JPG
|
|
.. image:: images/win/ts_go_bios.JPG
|
|
|
|
|
|
-If you run into this error message "The VM failed to remain in the 'running'
|
|
|
|
-state while attempting to boot", please check that your computer has virtualization
|
|
|
|
-technology available and activated by going to the BIOS. Here's an example for an HP
|
|
|
|
-computer (System configuration / Device configuration)
|
|
|
|
|
|
+If you run into this error message "The VM failed to remain in the
|
|
|
|
+'running' state while attempting to boot", please check that your
|
|
|
|
+computer has virtualization technology available and activated by
|
|
|
|
+going to the BIOS. Here's an example for an HP computer (System
|
|
|
|
+configuration / Device configuration)
|
|
|
|
|
|
.. image:: images/win/hp_bios_vm.JPG
|
|
.. image:: images/win/hp_bios_vm.JPG
|
|
|
|
|
|
@@ -192,5 +214,6 @@ Docker is not installed
|
|
|
|
|
|
.. image:: images/win/ts_no_docker.JPG
|
|
.. image:: images/win/ts_no_docker.JPG
|
|
|
|
|
|
-If you run into this error message "The program 'docker' is currently not installed",
|
|
|
|
-try deleting the docker folder and restart from :ref:`launch_ubuntu`
|
|
|
|
|
|
+If you run into this error message "The program 'docker' is currently
|
|
|
|
+not installed", try deleting the docker folder and restart from
|
|
|
|
+:ref:`launch_ubuntu`
|