Detailed tutorial on installing Docker on Windows

Detailed tutorial on installing Docker on Windows

Since my local MySQL version is relatively low, I have been thinking about upgrading the MySQL version recently. In view of the popularity of Docker containers, I thought about installing a Docker environment locally, and then downloading the latest version of the MySQL image to complete the installation of MySQL 8.0. The computer is Windows 10 version.

1. Enable Hyper-V

Open Control Panel-->Programs-->Turn Windows features on or off, check Hyper-V, and click OK.



After clicking OK, you will be prompted to restart the system.

2. Install Docker

Download address: https://hub.docker.com/editions/community/docker-ce-desktop-windows. You must register an account before downloading. Direct download is very slow.



Another way to obtain it is to follow the official account "情系IT" and reply "docker" to obtain the installation exe file.

Three start docker

After obtaining the exe file, simply click Next to complete the installation. After the installation, you will be prompted to restart the computer. A docker icon will appear on the desktop, click to start it. Open the Windows command line mode and enter docker version or docker -v to view. If the following information is displayed, the installation is successful.


Four domestic mirror acceleration

Alibaba Cloud mirror acceleration address: https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors

Get the exclusive accelerator address, as shown below:



Open Docker, right-click Settings-->Daemon-->Registry mirrors and copy the exclusive accelerator address just now to this place. This completes the domestic mirror acceleration.


5. Mobile image storage directory

Docker under Windows 10 has a visual operation interface and command line operation. After downloading docker-ce.exe, double-click it and it will automatically start and end. It is installed in the C drive directory by default, which means that many default parameters or configuration files are in the C drive directory. Considering that the C drive is the system drive, many image files may be pulled during the use of Docker, so we need to modify the default image file storage address of Docker.

Open Hyper-V Manager.

1. Right-click the Start menu -> Control Panel -> Administrative Tools -> Hyper-V Manager

Right-click and select Hyper-V Settings, and change the storage path shown in the figure below to the location you want to store.


Then add the following configuration in Settings-->Daemon-->Advanced:


Possible problems


The solution is:

cd "C:\Program Files\Docker\Docker"
DockerCli.exe -SwitchDaemon

In this way, we have completed the docker installation of windows10. In the next chapter, we will install and run the mysql8.0 image.

Summarize

The above is the tutorial on how to install Docker under Windows introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Docker installation and deployment tutorial under CentOS7.6 system
  • Detailed steps to install Docker on CentOS7
  • Docker installation and running SRS process record

<<:  A brief analysis of using JDBC to operate MySQL requires adding Class.forName("com.mysql.jdbc.Driver")

>>:  A brief discussion on where the token generated by node using jwt should be stored

Recommend

JS implements array filtering from simple to multi-condition filtering

Table of contents Single condition single data fi...

About the usage and precautions of promise in javascript (recommended)

1. Promise description Promise is a standard buil...

js to achieve simple image drag effect

This article shares the specific code of js to ac...

How to Install Oracle Java 14 on Ubuntu Linux

Recently, Oracle announced the public availabilit...

Detailed explanation of crontab scheduled execution command under Linux

In LINUX, periodic tasks are usually handled by t...

CSS animation property usage and example code (transition/transform/animation)

During development, a good user interface will al...

Solution to the Multiple primary key defined error in MySQL

There are two ways to create a primary key: creat...

How to query json in the database in mysql5.6 and below

When saving data in MySQL, sometimes some messy a...

A brief discussion on several advantages of Vue3

Table of contents 1. Source code 1.1 Monorepo 1.2...

How to run Hadoop and create images in Docker

Reinventing the wheel, here we use repackaging to...

Install MySQL (including utf8) using Docker on Windows/Mac

Table of contents 1. Docker installation on Mac 2...

JavaScript canvas realizes dynamic point and line effect

This article shares the specific code for JavaScr...

Example of adding attributes using style in html

Add inline styles to the required links: Copy code...

Detailed explanation of the use of MySQL Online DDL

Table of contents text LOCK parameter ALGORITHM p...