CentOS Linux Yum Docker安装与升级

官网安装:https://docs.docker.com/engine/install/centos/#install-using-the-repository

卸载旧版

powershell 复制代码
# 停止docker
systemctl stop docker
# 卸载docker
yum remove docker \
	docker-client \
	docker-client-latest \
	docker-common \
	docker-latest \
	docker-latest-logrotate \
	docker-logrotate \
	docker-engine
或
yum remove docker*
  • yum可能会报告您没有安装这些包。
  • /var/lib/docker/卸载 Docker 时,存储的图像、容器、卷和网络不会被自动删除

查看可用版本

powershell 复制代码
yum list docker-ce --showduplicates | sort -r

docker-ce.x86_64    3:26.1.3-1.el9    docker-ce-stable
docker-ce.x86_64    3:26.1.2-1.el9    docker-ce-stable

官网版本说明个人没看明白,此处个人的理解:
3:26.1.3-1.el9 冒号前面3代表docker-ce 和 docker-ce-cli 用于区分不同的包,26.1.3-1.el9 是实际版本。

安装Docker

bash 复制代码
yum install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io docker-buildx-plugin docker-compose-plugin
# 个人没有安装:docker-buildx-plugin docker-compose-plugin
yum install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io
# 示例
yum install docker-ce-26.1.2-1.el9 docker-ce-cli-26.1.2-1.el9 containerd.io

启动

bash 复制代码
systemctl start docker
相关推荐
lhyzws几秒前
CENTOS上的网络安全工具(二十九)GPU助力SPARK
linux·spark·gpu算力
学嵌入式的长路12 分钟前
正点原子imx6ull移植lvgl v8.3及触摸屏调试
linux·驱动开发·lvgl·imx6ull·触摸屏
馨谙18 分钟前
使用 systemd 单元管理容器环境完全指南
linux
石像鬼₧魂石18 分钟前
有哪些常见的字典可以用于Hydra的密码破解?
linux·学习·ssh
RXXW_Dor21 分钟前
西门子EtherNet/IP 适配器 通过 EtherNet/IP 将第三方控制系统连接到 SIMATIC S7 控制器
linux·网络·tcp/ip
Mr.H012721 分钟前
(上册)TCP 服务器核心流程实操指南
linux·服务器·网络·tcp/ip
某zhuan33 分钟前
云计算实验5——MapReduce编程实现计算一个大文本文件中所有单词出现的个数
centos·云计算·mapreduce
北冥有鱼被烹37 分钟前
【微知】Ubuntu中如何安装docker?
ubuntu·docker
DeeplyMind1 小时前
Guest → QEMU → Virglrenderer 调用逻辑分析
linux·驱动开发·虚拟化·virtio-gpu·virglrenderer
chenzhou__1 小时前
LinuxC语言并发程序笔记(第二十天)
linux·c语言·笔记·学习