CentOs7安装docker

卸载旧版本Docker(如果系统之前没安装过Docker,可以跳过):

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

安装Docker所需要的包:

yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2

设置稳定的仓库:

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

安装最新版的Docker引擎:

yum install docker-ce docker-ce-cli containerd.io

启动Docker:

systemctl start docker

停止Docker

systemctl stop docker

查看是否安装成功:

docker -v

你可能感兴趣的:(mrbird)