Install docker on centos7

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.