2018-08-17

centos7安装docker

设置yum源
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager  --add-repo  https://download.docker.com/linux/centos/docker-ce.repo
yum makecache fast

安装docker
yum install docker-ce

启动//停止

docker version   #查看版本
systemctl start docker  # 启动
systemctl status docker   # 查看状态
systemctl stop docker   # 停止
systemctl restart docker  # 重启
systemctl enable docker  # 开机自动启动

# 验证
docker run hello-world 
ROO4FKTCY7W}55RJN0N7599.png

如上证明安装成功

你可能感兴趣的:(2018-08-17)