CentOS 7下安装Docker

安装一些必要的系统工具:

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

 

更新 yum 缓存:

sudo yum makecache fast

 

安装 Docker-ce:

sudo yum -y install docker-ce

 

设置 Docker 开机自启

sudo systemctl enable docker

 

启动 Docker 后台服务

sudo systemctl start docker

 

测试运行 hello-world

[root@runoob ~]# docker run hello-world

 

 
posted @ 2019-12-27 15:53  一事冇诚  阅读(632)  评论(0编辑  收藏  举报