Docker study notes (two)-installation

This article introduces the installation, testing and image acceleration of Docker under win10 system

One, enable Hyper-V

Before installing Docker on Windows, you must start the virtual machine first, and we can directly enable Hyper-V. It is the virtual technology that comes with the Windows 10 Professional system. It should be noted that after Hyper-V is enabled, some other virtual machine software cannot be used, such as Virtualbox...

Steps

"Start" ==> "Control Panel" ==> "Programs" ==> "Enable or disable windows functions"

Check "Hyper-V" to enable this function and restart the computer.

In addition, you need to enable virtualization in advance, you can check whether it is enabled in "Task Manager" ==> "Performance" ==> "cpu"

If not, enter the BIOS setup before booting. Press F12 to enter the BIOS. After entering the BIOS, find the Configuration option or the Security option. Then select Virtualization or Intel Virtual Technology and set its value to: Enabled.


Second, install Docker

download

Official download address: https://www.docker.com/get-started

installation

Double-click the downloaded "Docker for Windows Installe" installation file, all the way to Next, click "Close and log out" to complete the installation and restart.

After the installation is complete, Docker will start automatically. A little whale icon will appear on the notification bar , which means Docker is running.


Three, test hello world

  • View version and other information

docker info

  • hello world test

docker run hello-world


Four, image acceleration

The domestic faster mirroring original address

#Docker官方中国区
https://registry.docker-cn.com
#网易
http://hub-mirror.c.163.com
#ustc
https://docker.mirrors.ustc.edu.cn

method one

Specify the mirror source address when pulling the mirror, and the effective time is the current command .

$ docker pull registry.docker-cn.com/myname/myrepo:mytag

E.g:

$ docker pull registry.docker-cn.com/library/ubuntu:16.04

Method Two

Use –registry-mirror to configure the docker daemon, and pass in the parameters when the docker configuration daemon starts, so that you do not need to specify registry.docker-cn.com every time you pull. The effective time is the current docker process and needs to be reset after restarting the Docker service.

$ docker --registry-mirror=https://registry.docker-cn.com daemon

Method Three

In order to keep the changes permanently , you can set up Daemon in docker, add a registry mirror, and restart the Docker service after application.

 

Guess you like

Origin blog.csdn.net/qq_14997473/article/details/89844086