centos7上docker安装并启动
从包安装更新yum yum update转到 https://download.docker.com/linux/centos/7/x86_64/stable/Packages/ 并下载.rpm要安装的Docker版本的文件安装Docker CE,将下面的路径更改为您下载Docker软件包的路径。# yum install /path/to/package.rpmeg:yum inst...
·
从包安装,最简安装方式
- 更新yum
yum update
- 转到 https://download.docker.com/linux/centos/7/x86_64/stable/Packages/ 并下载.rpm要安装的Docker版本的文件
- 安装Docker CE,将下面的路径更改为您下载Docker软件包的路径。
# yum install /path/to/package.rpm
eg:yum install https://yum.dockerproject.org/repo/main/centos/7/Packages/docker-engine-1.10.0-1.el7.centos.x86_64.rpm
查看安装是否成功docker version
,client启动成功
- 启动docker
systemctl start docker
查看启动成功docker version
,client和service启动成功
或者运行docker run hello-world
映像验证是否已正确安装
- 设置开机自启动
sudo systemctl enable docker
- 卸载docker
yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
资料参考:https://docs.docker.com/install/linux/docker-ce/centos/#upgrade-docker-ce
更多推荐
已为社区贡献1条内容
所有评论(0)