1. Install Vmware

1. Download Vmare

Softdown01. Rbread04. Cn/huajunsafe /…

I chose to install on this website, version 16.0, it is a virtual machine software. But login needs activation code, here oneself go baidu, generally ok.

2. Download Linux (CentOS 7)

Mirrors.aliyun.com/centos/7/is…Recommended to use domestic mirror download, faster. As for the next one, it depends on personal preference.I’m going to use this one, because I occasionally use graphical interfaces.

3. Install CentOS 7

Use Vmware to install, choose a bit larger memory, preferably 8G, of course 4G is also ok, hard disk set to 30G. Check the server with GUI, development tools check, the rest of the default.

The IP addr command displays the IP address.

Minimal installation can only be used to query commands because ifconfig is not installed and there is no network by default and configuration files need to be modified.

Run the vi /etc/sysconfig/network-scripts/ifcfg-ens33 command to change ONBOOT=no to yes

Yum yum provides ifconfig # yum yum provides ifconfig # yum yum provides ifconfig

Yum install -y wget yum install -y LRZSZ #

Install Docker

Check your own version of the kernel

[root@localhost ~]# cat /etc/redhat-release

Download the file docker-ce.repo

Run the vi command to modify the original file:%s@https://download.docker.com/@https://mirrors.tuna.tsinghua.edu.cn/docker-ce :wq

To viewyum repolistThen installsudo yum install docker-ce docker-ce-cli containerd.io

After installation, set docker to bootsystemctl enable docker systemctl start docker.service Systemctl status docker # Check service startup status A test runsudo docker run hello-worldThe download source is not configured[root@localhost download]# sudo touch /etc/dock/daemon.json

[root@localhost download]# vi /etc/dock/daemon.json

[root@localhost download]# systemctl restart docker

[root@localhost download]# systemctl status docker

Docker did not find the helo-world image locally, nor did it pull the image from the Docker warehouse. The reason for this problem is that the Docker server is abroad, and we cannot pull the image normally in China, so we need to set up the domestic Ali Cloud image accelerator for Docker. You need to modify the configuration file /etc/docker-daemon. json as follows:"registry-mirrors": ["https://alzgoonw.mirror.aliyuncs.com"]}Copy the code

Screenshot of successful Operation

Finally, clone the vm that has Docker installed.