Install Docker on CentOS7

Introduction: Today, when Docker is popular, Docker is often used for software operations. The most used place for Docker is on Linux. It is often used. It is a bit troublesome to open Docker's official website every time to install Docker on CentOS. The installation process of Docker is recorded here.
Today, when Docker is popular, Docker is often used for software operations. The most used place for Docker is on Linux, and it is often used. It is a bit troublesome to open Docker's official website every time to install Docker on CentOS, which is recorded here. The following Docker installation process.

【Install Docker on CentOS7】Install


1.Uninstall the old docker, optional. If the K8S platform is built, the docker that comes with CentOS will report an error, so it is best to use the latest official docker version.
sudo yum remove docker
docker-client
docker-client-latest
docker-common
docker-latest
docker-latest- logrotate
docker- logrotate
docker- selinux
docker-engine- selinux
docker-engine
1.Install the yum tool class
sudo yum install -y yum-utils
device-mapper-persistent-data
lvm2
1.Enable Docker sources
sudo yum-config-manager
--add -repo
http s : //download.docker.com/linux/centos/docker-ce.repo _ _ _
1.Install Docker
sudo yum install docker- ce
1.Disable the Docker source. After installing Docker, you can disable the Docker source, otherwise it will be very slow to install other software in the future.
2.Configure domestic Docker warehouses to speed up Docker image downloads
systemctl start docker
vim/ etc /docker/ daemon.json

{
"registry-mirrors " : [
"https://registry.docker-cn.com"
]
}

【Install Docker on CentOS7】At last


In this way, Docker is installed, let's operate as much as you like.

Copyright statement: The content of this article is contributed by Alibaba Cloud's real-name registered users. The copyright belongs to the original author. The Alibaba Cloud developer community does not own the copyright and does not assume the corresponding legal responsibility. For specific rules, please refer to the " Alibaba Cloud Developer Community User Service Agreement " and " Alibaba Cloud Developer Community Intellectual Property Protection Guidelines ". If you find any content suspected of plagiarism in this community, fill out the infringement complaint form to report it. Once verified, this community will delete the allegedly infringing content immediately.

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00