Centos7 install docker, automatic installation and configuration of Alibaba Cloud image acceleration

Manual installation is too cumbersome. Make a record of an automated installation method.

 

Command, the mirror image of Alibaba Cloud.

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

Start after the installation is complete, set the boot to start

systemctl start docekr

systemctl enable docker

Note that the time in the docker may not be right after the installation is complete. Please pay attention to check the time in the docker and check that the docker can connect to the external network.

Please refer to: https://blog.csdn.net/csd_nuser/article/details/110090583

You can also replace the docker image, the download is faster, here is my Alibaba Cloud image. Just copy and execute it directly.

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://ejrf8brk.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

 

Guess you like

Origin blog.csdn.net/csd_nuser/article/details/110752108