Install Docker on Centos7.6

(Run as an administrator, if you are not currently a super user, add sudo before the command)

Uninstall the old version (if any)

yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine

Install docker official source

yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Install docker-engine

yum install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin

start docker

systemctl start docker

Set docker to start automatically at boot

systemctl enable docker

Pull and build Docker image

Pull the Redis image

docker pull redis

 

Pull the MySQL image

docker pull mysql

 

Guess you like

Origin blog.csdn.net/jieyongquan/article/details/129763241