Centos环境下Docker安装
安装前
# 工具下载
1、yum install wget -y
2、wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo && wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
3、sudo yum install -y yum-util
4、yum makecache fast
镜像地址配置
sudo yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
安装脚本
sudo yum install docker-ce docker-ce-cli containerd.io
安装后
# 启动服务
sudo systemctl start docker
# 开机启动
systemctl enable docker