Install docker on centos7
After learning from the Internet, docker is installed under centos7, and the knowledge and steps are organized for backup.
1. Check Dependencies
Docker requires a 64-bit system. The kernel version must be later than 3.10.
[Root @ lilong ~] # Uname-r
3.10.0-693.2.2.el7.x86 _ 64
2. install and use the yum software management tool. You must configure the docker source in advance. The format must be correct and no error will be reported. [Root @ lilong ~] # Cat>/etc/yum. repos. d/docker. repo <-EOF
> [Dockerrepo]
> Name = Docker Repository
> Baseurl = https://yum.dockerproject.org/repo/main/centos/7
> Enabled = 1
> Gpgcheck = 1
> Gpgkey = https://yum.dockerproject.org/gpg
> EOF enters a row and press enter until the last row. Update the software package [root @ lilong ~] # Install [root @ lilong ~] In yum update # Yum install docker-engine start [root @ lilong ~] # Service docker start test [root @ lilong ~] # Add docker run hello-world to auto-start
[Root @ lilong ~] # Chkconfig -- level 35 docker on3. Uninstall The doker package list [root @ lilong ~] # Yum list installed | grep docker
Docker-engine.x86_64 17.05.0.ce-1. el7.centos @ dockerrepo
Docker-engine-selinux.noarch 17.05.0.ce-1. el7.centos @ dockerrepo Delete [root @ lilong ~] # Yum-y remove docker-engine.x86_64 docker-engine-selinux.noarch Note: This command only deletes the docker runtime environment and does not delete images, containers, Volume files, and user-created configuration files. Clear the image and container file [root @ lilong lib] # rm-rf/var/lib/docker