bash脚本-centos7安装docker

#!/bin/bash
set -ex \
    && sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-selinux \
                  docker-engine-selinux \
                  docker-engine
    && sudo yum install -y yum-utils device-mapper-persistent-data lvm2 \
    && sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo \
    && sudo yum makecache fast \
    && sudo yum -y install docker-ce

启动:

sudo systemctl start docker

 

你可能感兴趣的:(安装脚本)