-
安装数据存储驱动包
shellyum install -y yum-utils device-mapper-persistent-data lvm2 -
添加阿里安装源
shellyum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -
自动检测哪个安装源快
shellyum makecache fast -
安装docker服务(服务器和客户端都会安装)
shellyum -y install docker-ce -
启动docker服务
shellservice docker start -
查看docker版本
shelldocker version -
拉取
hello-world镜像shelldocker pull hello-world -
启动
hello-world容器shelldocker run hello-world
centos7安装docker
shuair2024-03-31 11:21