centos7 安装稳定版docker 脚本

以ROOT账号运行

#!/bin/bash
yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine &&
yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2 &&
yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo &&
yum -y install docker-ce docker-ce-cli containerd.io &&
systemctl start docker &&
docker -v

你可能感兴趣的:(Linux,docker,容器,运维)