Docker installation under Windows and Hello World

Source: Internet
Author: User
Tags docker hub docker run

This article mainly describes the installation of Docker under Windows. The introduction and documentation about Docker can be found in its official website: http://www.docker.com. Installation environment: Windows7.

The Docker engine uses a custom Linux kernel, so to run Docker under Windows we need to use a lightweight virtual machine (VM), we use the Windows Docker client to control the Docker engine to create, Run and manage our Docker containers (refer to the website for specific concepts such as Docker engines, containers, etc.).

Installation steps

The first step:

First go to the https://github.com/boot2docker/windows-installer/releases page to download the latest Windows Docker client, Currently the latest version is v.1.0.0, download comes to an EXE file, directly double-click Run.

Figure 1. Docker installation files under Windows

Step Two:

Executes the installation file.

Figure 2.3 main parts of the installation file

The installation process all the way to the next step, in the 3rd step we can see that the actual installation includes 3 parts, the first is Docker under Windows Script and virtual machine, the second is Oracle's VirtualBox, and the third is Msys, is one of the best GNU environments under Windows.

Here we are all checked, all installed. The next step after waiting for the installation to end, the installer prompts to restart, in order to ensure the success of the installation to avoid accidental, here restart.

Step Three:

By default, two shortcuts are generated on the desktop, Docker clients and VirtualBox, double-click Docker clients, and the first run will install BOOT2DOCKER-VM virtual machines in VirtualBox. Automatic startup after successful installation (this does not require the user to manually start the BOOT2DOCKER-VM virtual machine in VirtualBox each time, the virtual machine starts automatically after the Docker client is executed).

Figure 3: The client installs the virtual machine and connects to the successful interface

To Figure 3, the installation is successful.

Figure 4. Test, login Docker, success

Problems you may encounter during the installation process:

During the first boot process, the client may appear BOOT2DOCKER-VM is not running, which indicates that there is a problem with the installation of the virtual machine, and we can try to start it manually to VirtualBox.

Figure 5. Manually start the BOOT2DOCKER-VM virtual machine, double-click

At this point, VirtualBox will be error, E_FAIL (0x80004005), the popup window as shown, "Can not open a new task for virtual computer BOOT2DOCKER-VM".

Figure 6: Possible errors (Pictures from the network)

Figure 7. Here is a more detailed error (image from the network)

The cause of the error is generally the reason why Intel virtual technology, the host, is not turned on for this error.

Workaround, restart the computer, enter the BIOS interface before the system starts, and start Intel Virtual technology as shown (different BIOS systems are in different locations, but very similar).

Figure 8: Booting into BIOS Intel Virtual technology (image from Network)

Exit the BIOS, save the settings and restart the machine, and start the Docker client again.

Docker of the Hello World

The first step:

Before running using Docker, let's create a Docker account so that we can use the Docker Hub,docker Hub is the core library of Docker, which helps us manage Docker and its components.

It also provides a master image, user authorization, automated mirroring and workflow tools like build triggers and web hooks, as well as integration with GitHub and BitBucket.

We can sign in directly to the Docker website or register directly with the command.

$ sudo docker login

Step Two:

Simple output of the Hello World command

$ sudo docker run Ubuntu:14.04/bin/echo ' Hello world '

Run as follows:

Figure 9. Hello World

The first time you use this command, Docker checks out the Ubuntu image (the Ubuntu Docker image) from the cloud to local.

This command completes a simple function, but the work of the Docker kernel includes checking out dependent images, creating and destroying containers, and so on. For a detailed explanation of this command, please visit the Docker website.

The above is the installation of Docker under Windows and Hello World.

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.