docker安装
docker官网安装教程:https://docs.docker.com/install/linux/docker-ee/centos/
系统环境centos7
1、卸载旧的docker,执行以下命令:
sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine
结果如下:
2、更新yum,执行命令:sudo yum -y update
3、安装所需的软件包,执行如下命令:
sudo yum install -y yum-utils \ device-mapper-persistent-data \ lvm2
4、设置存储库
sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
5、安装最新版本的Docker
sudo yum install docker-ce docker-ce-cli containerd.io
6、启动Docker
sudo systemctl start docker
7、查看docker版本信息:sudo docker version
8、通过运行hello-world
映像来验证是否正确安装了Docker
sudo docker run hello-world
9、配置开机启动Docker
sudo systemctl enable docker
经过以上步骤,centos下docker社区版安装成功!