How to start docker service in linux

Release: 2020-03-18 15:53:19
Original
9811 people have browsed it

How to start docker service in linux

1. Docker installation

Recommended:docker tutorial

Check your current kernel version through the uname -r command

uname -r
Copy after login

Log in to Centos with root permissions. Make sure the yum package is updated to the latest.

yum update
Copy after login

Uninstall the old version (if the old version has been installed)

sudo yum remove docker docker-common docker-selinux docker-engine
Copy after login

Install the required software packages, yum-util provides the yum-config-manager function, and the other two are dependent on the devicemapper driver

sudo yum install -y yum-utils device-mapper-persistent-data lvm2
Copy after login

Set yum source

sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
Copy after login

You can view all docker versions in all warehouses and select a specific version to install

yum list docker-ce --showduplicates | sort -r
Copy after login

Install Docker

sudo yum install  # 例如:sudo yum install docker-ce-18.03.1.ce
Copy after login

Start and join the boot startup

sudo systemctl start docker sudo systemctl enable docker
Copy after login

Recommended learning:Linux video tutorial

The above is the detailed content of How to start docker service in linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!