Do we see that many software deployments are based on the Docker environment. We need to deploy Docker in the server environment before we can execute it. In recent years, many of our friends have deployed Docker because of its popularity. In particular, for the deployment of the Docker environment, many people have also produced the corresponding quick installation script package. For example, Lao Zuo shared it a few days ago“ One click script to quickly install Docker container "。
Here, Lao Zuo found a script that can directly deploy the latest official version of Docker CE. If we need it, we can install it.
yum install -yyum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo yum install docker-ce docker-ce-cli containerd.io
This is based on the CentOS7+environment. If we need to install Ubuntu or Debian, we need to simply replace the apt command.
If the official source acquisition fails, we can also use the domestic Alibaba source.
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
After the installation, we can check whether it is successful.
docker version
If the Docker version number is returned, the installation is successful. If the installation is not successful, you need to check the problem.
systemctl start docker.service
Run Start Execution.
If we need to uninstall
yum remove docker-ce
Here is another way to install Docker. Let's try it.
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge