Tutorial on installing Docker under Windows _docker

Source: Internet
Author: User
Tags ssh git clone

Unofficial NOTE: Your CPU must support VT, the author of the Notebook T6400 not support VT is not installed, so be sure to support VT, the author of the Mac is OK, the company's computer is also to force, if the installation of the Win7 system is required to 64 of the system.

In the previous section we introduced the installation under Ubuntu and CentOS, of course, are based on 64-bit system, in the learning process, you may not have these things, of course, you can use VirtualBox or VMware virtualization, today we introduce the website to provide us with the using vagrant!

Introduced

Docker can be run on Windows with virtual host technology like VirtualBox, you can run Linux in a virtual host!

Installation Warning

      Official stated that Docker is still in the process of development, not recommended in the operation of the product to use it, but now more and more close to the official version, please pay attention to our blog http://blog.docker.io/2013/08/getting-to-docker-1-0/

      The installation of Windows is a Community contribution, the only official installation method is Ubuntu is the last section we introduced, this version may be outdated because it depends on some binary package update and release

Prepare before installation

      Installation VirtualBox website Download address: https://www.virtualbox.org All the way Next on it (unofficial note: Of course, you will not install or feel slow download, you can use 360 or QQ soft Jia Butler download automatic installation)

      Install vagrant from official website: http://www.vagrantup.com, choose the installation path all the way to next.

      Download and install Git (with SSH features) from the official website: http://git-scm.com/downloads Download and install, this is actually the way next (to GitHub submitted code should be most clear)

The official recommendation is at least 2GB of disk space and 2GB of RAM!

Run the command prompt

To first open the cmd command prompt, you can hold down the Windows key (unofficial note: The CTRL key next to the Microsoft icon) +r, and then enter cmd, press ENTER (enter) on it, Of course, you can also search for Cmd.exe on your computer (unofficial note: If you use win8 like I do, you can windows key +x Select command Prompt administrator that)

Of course you can use the Cygwin terminal or git bash these command lines can be all the same.

Install an Ubuntu virtual server

Let's download and run a binary file that has installed Ubuntu Docker

git clone https://github.com/dotcloud/docker.gitcd dockervagrant up

It's not in the official document, but you'll find it.

After the update kernel completes, there are some fields, such as upgrade the kernel may appear vagrant halt words, this time you need vagrant halt to enter, and then enter vagrant up may appear as follows

This time you need vagrant provision to enter and then detect the continue to update the installation, and then vagrant ssh it will be

Here you have to wait a long time, to play a game to play it! Because it will download a lot of things, and our visit to the United States is generally relatively slow, so I suggest you do something else first!

I found that I installed the scene with the official display is not the same, but after the installation is the same, I take the actual to everyone to see!

After the screenshot above, enter vagrant halt , then output vagrant up to open the machine, of course, you can in the VirtualBox inside to shut it!

congratulations! You are are running an Ubuntu server with Docker installed on it. You did not the it though, because it are running in the background

Take the official-now you can celebrate, you're running the Docker Unbuntu server, but you can't see it because it's running in the background (unofficial note: But you can see it from your VirtualBox)

Login to your Unbuntu server now login to your Ubuntu server, you now have two options to use the Vagrant command line to operate using SSH (my putty) using the Windows command line

vagrant ssh

At this point you may see the error message "SSH executable not found".the reason for the error is that your SSH was not added to the executable path path, at which point you can add a path with the set command, such as your ssh.exe in your "C :P Rogram Files (x86) Gitbin "This directory, you just enter the command

set PATH=%PATH%;C:\Program Files (x86)\Git\bin

And then it's OK vagrant ssh , after the login is this

If at this time you appear to be wrong "the program ' Docker ' are currently not installed", then it is regrettable that you can only reinstall from the beginning

Login using SSH Client

First, you need to get your login IP and port, enter

`vagrant ssh-config`

This time, you will see output hostname is you login IP, port number 2222 , user default vagrant, passwords are vagrant, and then you can use SSH login, I use is putty, the official use is also putty

Of course, if you use Git bash, you can also enter commands when you run the terminal, and the account password is vagrant.

ssh vagrant@127.0.0.1 –p 2222

Run Docker first get root

sudo su

This time you'll be able to run demo Hello Word.

Below is the Ubuntu I installed with VirtualBox and the Docker installed in Ubuntu.

This paper is contributed by Widuu translation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.