This is the 11th day of my participation in Gwen Challenge
preface
Welcome to our GitHub repository Star: github.com/bin39232820…
omg
In the past, docker had to be on Linux, and then if we use Windos, we’d have to install a virtual machine first, and then we’d have to play Docker, which is the right way to play docker, because we’re going to end up on Linux, but if you don’t like Linux, So today small 66 to take you to see how to play under Windows
Download address
Windows Download address
Open the Hyper – V
Hyper-v is a VM application that comes with Windows. If yes, open the Control Panel, choose Programs > Programs and Features > Enable or Disable Windows features, locate Hyper-V, select it, and click OK.
Download the docker
After downloading, you will see an EXE file marked below
Install the docker
In fact, the installation is very simple, is the next step, the next step is good, I believe that you should be able to it!
Finally, the desktop generates an icon
At this point docker is installed successfully
And then you just have to sign up, sign up by email, and log in. It’s pretty easy
Get ali mirror step
Because docker uses official foreign images by default, it will take a long time for friends to pull the images down. Here you have Aliyun to configure the domestic warehouse of Docker images, and the time to download the images will be reduced a lot.
Log in to Aliyun
Ali cloud
Products and Services –> Container image services
Find your own image accelerator, then open up our Docker and hit Settings
Then configure the mirror accelerator
Now that Docker is fully configured, we can play with it
Using a Docker
Open up our own Windows CMD console
- docker -v
Now you can see that we have installed doker-compose successfully. Ok, next, let’s look at doker-compose. Why? Because a lot of times we deploy components through Compose
Download the docker – compose
Download address
Just go to a downloadable file and download it and look like this
And then we run and we set it up, which is very convenient.
Verifying the Installation
Docker – compose the mysql installation
To use docker-compose, you need to create a file named docker-compose. Yml.
As shown above, you need to enter the command line tool in the current directory and run docker-compose up -d
version: '3'
services:
db:
image: mysql
restart: always
privileged: true
environment:
MYSQL_ROOT_PASSWORD: 123456
command:
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
--max_allowed_packet=128M;
ports:
- 3306:3306
volumes:
- ./data:/var/lib/mysql
Copy the code
Then you will find that mysql is started.
And he also provides a page of some operations, or pretty convenient.
I finally connected to my database
conclusion
Actually quite simple, but small sixty-six side is the default you will point docker, otherwise a lot of you do not know the preconditions, it is difficult to complete, well, here, I am small sixty-six three days fishing, two days drying nets.
Daily for praise
Ok, everybody, that’s all for this article, you can see people here, they are real fans.
Creation is not easy, your support and recognition, is the biggest motivation for my creation, we will see in the next article
Six pulse excalibur | article “original” if there are any errors in this blog, please give criticisms, be obliged!