RHEL8.5部署docker容器工具

本文档介绍了如何在 CentOS 9 系统上彻底卸载旧版 Docker 并安装 Docker CE 的过程,包括添加 Docker 仓库、安装所需工具包和 Docker 相关组件,以及启动 Docker 和运行 'hello-world' 容器来验证安装成功。确保使用阿里云的 Docker 镜像源以避免安装错误。
摘要由CSDN通过智能技术生成

使用前先清理环境,最好运行一遍

yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine \
                  podman \
                  runc

安装yum的工具包集合

yum install -y yum-utils

安装docker仓库

yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/rhel/docker-ce.repo 

安装docker工具包

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

镜像源,出错时注意镜像源有没有报错

https://mirrors.aliyun.com/docker-ce/linux/centos/9/x86_64/stable/

查看状态、启动

systemctl start docker
systemctl status docker 

运行一个hello-world容器

docker run hello-world
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值