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
相关推荐
南境十里·墨染春水5 分钟前
linux学习进展 进程
linux·运维·学习
cyber_两只龙宝10 分钟前
【Oracle】Oracle之DQL中SELECT的基础使用
linux·运维·服务器·数据库·云原生·oracle
云栖梦泽10 分钟前
Linux内核与驱动:10.平台总线platform
linux
Deitymoon14 分钟前
linux——TCP多进程并发服务器
linux·服务器·tcp/ip
网络安全许木15 分钟前
自学渗透测试第15天(基础复习与漏洞原理入门)
linux·网络安全·渗透测试·kali linux
Hello World . .19 分钟前
linux驱动编程2 : uboot、Linux内核、rootfs来源及制作流程
linux·运维·服务器
geinvse_seg26 分钟前
开源实战——手把手教你搭建AI量化分析平台:从Docker部署到波浪理论实战
人工智能·docker·开源·蓝耘元生代·蓝耘maas
啦啦啦_999936 分钟前
1. Linux常用命令
linux·运维·服务器
大白菜和MySQL37 分钟前
openEuler-20.03-LTS系统 nextcloud网盘搭建
linux