centos 7 安装docker

1.卸载旧版本
# yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine

2.安装依赖包
# yum install -y yum-utils device-mapper-persistent-data lvm2

3.设置yum源
# yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

4.安装docker-ce
# yum install docker-ce docker-ce-cli containerd.io

5.启动docker并且加入开机启动
# systemctl start docker
# systemctl enable docker

6.查看docker状态
# systemctl status docker

7.验证是否安装成功
# docker --version

  

posted @ 2021-09-09 14:31  orcl  阅读(23)  评论(0编辑  收藏  举报