linux centos7安装Docker

Linux centoros7安装doctor:

需要的安装包

yum install -y yum-utils

阿里云镜像(快)

yum-config-manager
–add-repo
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

更新yum软件包索引

yum makecache fast

安装docker,docker-ce 社区 (ee是企业版)

yum install docker-ce docker-ce-cli containerd.io

启动docker

systemctl start docker

查看启动是否成功

docker version

通过运行hello-world 映像来验证是否正确安装了Docker Engine 。

docker run hello-world

查看hello-world镜像

docker images

如果报错(Unable to find image ‘hello-world:latest’ locally)

创建daemon.json文件

touch /etc/docker/daemon.json

在文件内加入:

{
“registry-mirrors”: [“https://alzgoonw.mirror.aliyuncs.com”]
}

重启:service docker restart

运行映像:docker run hello-world

了解

#卸载Docker Engine,CLI和Containerd软件包:(了解)
yum remove docker-ce docker-ce-cli containerd.io

#主机上的映像,容器,卷或自定义配置文件不会自动删除。要删除所有图像,容器和卷:
rm -rf /var/lib/docker(默认安装路径)

你可能感兴趣的:(spring)