9.2-Docker-安装
优质
小牛编辑
133浏览
2023-12-01
1.1 清理已安装的 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
1.2 安装工具
yum install -y yum-utils
1.3 添加 repo 文件
yum-config-manager \
> --add-repo \
> https://download.docker.com/linux/centos/docker-ce.repo
1.4 安装 docker-ce
yum install docker-ce
1.5 启动 docker
systemctl start docker
1.6 运行测试
docker run hello-world