Install Docker Engine on CentOSDocker安装
Posted yangbocsu
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Install Docker Engine on CentOSDocker安装相关的知识,希望对你有一定的参考价值。
Install Docker Engine on CentOS
官网安装教程 : Install Docker Engine on CentOS
一、OS requirements
cat /etc/redhat-release
uname -r
二、Uninstall old versions
sudo yum remove docker \\
docker-client \\
docker-client-latest \\
docker-common \\
docker-latest \\
docker-latest-logrotate \\
docker-logrotate \\
docker-engine
三、yum 安装gcc
yum -y install gcc
yum -y install gcc-c++
四、安装相关的软件包
sudo yum install -y yum-utils
docker 阿里云仓库地址:http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
五、安装Docker Engine
Install the latest version of Docker Engine and containerd, or go to the next step to install a specific version:
sudo yum install docker-ce docker-ce-cli containerd.io
六、启动Docker
sudo systemctl start docker
查看启动的docker 进程:
ps -ef | grep docker
七、测试
sudo docker run hello-world
八、卸载
sudo yum remove docker-ce docker-ce-cli containerd.io
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
以上是关于Install Docker Engine on CentOSDocker安装的主要内容,如果未能解决你的问题,请参考以下文章
Docker - Install docker on CentOS
How to install Docker on Ubuntu