Docker Learning Series (i): Installing Docker under Windows

Source: Internet
Author: User
Tags docker ps docker hub jupyter oracle vm virtualbox docker toolbox vm virtualbox

This article is in the following directory:

    • Windows follows Docker's basic requirements
    • Specific installation steps
    • Start using
    • Installing the remote Connection tool connecting Docker
    • Problems encountered during installation
    • Updates to Docker
    • The Jupyter in Docker
    • Common commands for using Docker under Windows

The method of installing Docker under Windows should refer to the Docker website, before referring to other people on the Internet to translate the blog, some problems, and later found that the Docker update faster, the most appropriate way to install official website!

Here are a few tips from the Docker Chinese guide:

Tip 1:docker has passed the test on windows7.1 and Windows 8, and of course it can also be used on a lower version of Windows. However, your processor must support hardware virtualization.

Tip The 2:docker engine uses the Linux kernel features, so we need to use a lightweight virtual machine (VM) on Windows to run Docker. We use the Windows Docker client to control the construction, operation, and management of the Docker virtualization engine.

Tip 3: To simplify this process, we've designed an application called Boot2docker that you can use to install virtual machines and run Docker.

Tip 4: Although you are using the Windows Docker client, the Docker engine container is still running on the Linux host host (now via virtual box). Until we have developed the Windows version of the Docker engine, you only need to start a Linux container on your Windows host.

Refer to install Docker for Windows, that is, follow the steps of the site step by step, the site's tutorials are very detailed

1.windows According to Docker's basic requirements

(1) 64 for operating system, Win7 or higher
(2) "Hardware Virtualization Technology" is supported, and "virtualization" is available

2. Specific installation steps

Install Docker Toolbox with additional installation

    • Docker Client for Windows
    • Docker Toolbox management tool and ISO
    • Oracle VM VirtualBox
    • Git msys-git UNIX Tools
      Don't worry, the download of the Docker Toolbox has completely included these software, directly installed on the

1. Go to the download page of the Docker Toolbox and select the Windows version download

2. When the download is complete, double-click the installation file
3. Next, accept all default installations





Note: During the installation process, there will be several other installation procedures, such as Ocracle Corporation and other series of software, all choose to install, here are a few small examples:


Also, if you install 360, it may block the installation of the program, and you should be careful to allow the program to install

4. Final Finish

5. The entire installation process is very simple, after the installation is complete, you can get the following three icons on the desktop:

3. Start using

1. Click the Docker Quickstart Terminal icon to open a Docker Toolbox terminal

-After opening the terminal, terminal will automatically make some settings, which will take some time, after all, the following results appear

3. You can use Docker after you enter a variety of Docker commands
Note: You do not need to use sudo! as in Ubuntu
For example:
(1) View the version information of Docker

docker info
    • 1


(2) Login to Docker Hub's account

docker login
    • 1

Then, enter the user name and password, for example

Personally think: In the use of Docker, whether the landing is not particularly significant impact, but, if the landing, you can push their own image on the Docker hub

4. Install the Remote Connection tool to connect Docker

Following the above method to open Docker Toolbox terminal, found in the terminal, can not be copied, paste and other operations, use is very inconvenient, so, refer to Zistxym's blog, install Remote connection tool SECURECRT

    • Download SECURECRT
      Address: Green League SECURECRT Green version of the installation, do not know why, sometimes the two links hint there is a virus, so, and then provide a Baidu cloud disk link, extract code: RM3G
    • Run SECURECRT
    • Connecting Docker


      Note: The default user name and password are: Docker/tcuser

    • Using SECURECRT is the same as using Docker Quickstart terminal

      • When you use SECURECRT to connect Docker, you must first start the Docker Quickstart Terminal
    • Some of the settings for SECURECRT
      (1) found in use, the SecureCRT right mouse function is the default feature of the paste, with the style of the Windows system is inconsistent, if you want to change the right button for the popup Text Operation menu function, convenient for the selection of content to do copy editing operations, you can in the Options menu-"Global options--"terminal ——-" mouse function block will change paste on to: Right button

      At this point, when the right mouse button, the text Operation function popup menu, as follows:

      (2) Changing the font and background of SECURECRT


      Change the font of the current section only

5. Problems encountered during installation

After the installation is complete, the following error may occur when you open Docker Quickstart Terminal:

This is because the computer does not turn on the support vt-x/amd-v function, that is, does not turn on the virtualization technology, need to restart the computer, go to the BIOS to turn on the function

The following error occurred while using image to generate the image

Flag provided but not defined:

Think is because DOCEKR service and the version of the client, a variety of query toss, also did not succeed, and finally found that the command is actually a little space between-V and the path! Blame yourself for not looking carefully at the error alerts

~~~~~~~~~~

Update for 6.Docker

If the native installed Docker expires, that is, when a new version of Docker is released, the native Docker should be updated, or it will likely affect its continued use, then updates to the native Docker can be installed as follows:
(1) Open Docker Quickstart Terminal terminal
(2) Enter the command: docker-machine upgrade default
will start to automatically update the native Docker as shown in

(3) View the Docker version

version
    • 1

Jupyter in 7.Docker

I use the image with Jupyter, but found that according to the use of Ubuntu under the method, that is, after entering the container, open http://0.0.0.0:8888/cannot open the Jupyter, after a query to finally find the positive solution, The original Jupyter image has a clear explanation, but did not think to go there to inquire!

Specific methods:
(1) Open Boot2docker, enter docker-machine ip , will return an IP address, for example

$ docker-machine IP myjupytermachine
192.168.99.104

(2) Open the http://192.168.99.104:8888 in the browser to open the Jupyter
Instead of the same http://localhost:8888 as in Ubuntu (http://0.0.0.0:8888/)

Common commands for using Docker under 8.windows

The details are similar to those used under Ubuntu, see Docker Learning Series (iii): Basic instructions for using Docker under Ubuntu, and some caveats, but for convenience, here's a separate list

    • View native Images
docker images
    • 1
    • View the container running on the machine
docker ps
    • 1
    • Pull Mirror from Dockerhub
docker pull 镜像名称
    • 1
    • Run container with Image:
-it --rm -p 8888:8888 -v /c/Users/tingting/dropbox/code:/root/opt/workspace -v /c/Users/tingting/dropbox/data:/root/data tingtinglu/caffe_mxnet
    • 1

(1) using the parameter-v 
(2) The host directory before the colon, must be an absolute path  
①  /c/users/tingting/dropbox/code
Native C:\Users\tingting\dropbox\code folder  
②  /c/users/tingting/dropbox/data  
Native C:\Users\tingting\dropbox\data folder  
(3) After the colon is the path that is mounted within the mirror  
①  /root/opt/workspace  
folders in Docker /root/opt/workspace  
②  / Root/data  
folder in Docker /root/data  
(4) The local folder here is C drive, then, can I have a D drive?  
Test:

-it --rm -p 8888:8888 -v /d/Dropbox/code:/root /opt/workspace -v /d/Dropbox/data:/root/data tingtinglu/caffe_mxnet
    • 1

Discovery is not feasible! This is because currently, Windows only supports folder mappings under the C drive

Copyright NOTICE: This article for Bo Master original article, if need to reprint, please specify Source: Http://blog.csdn.net/tina_ttl

Docker Learning Series (i): Installing Docker under Windows

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.