【Docker】Linux升级

删除旧版本

shell 复制代码
yum remove docker  docker-common docker-selinux docker-engine

安装须要的软件包

shell 复制代码
yum install -y yum-utils device-mapper-persistent-data lvm2

设置Docker yum源

shell 复制代码
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

查看全部仓库中全部docker版本

能够查看全部仓库中全部docker版本,并选择特定的版本安装。

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

安装docker

shell 复制代码
#因为repo中默认只开启stable仓库,故这里安装的是最新稳定版25.0.3-1.el7
yum install docker-ce

#若是要安装特定版本:
yum install docker-ce-25.0.3-1.el7

启动

设置为开机启动

shell 复制代码
systemctl enable docker

启动

shell 复制代码
systemctl start docker

查看启动状态

shell 复制代码
systemctl status docker

查看版本

shell 复制代码
docker version
相关推荐
Vesan,1 分钟前
无人机飞控运行在stm32上的RTOS实时操作系统上,而不是linux这种非实时操作系统的必要性
linux·stm32·无人机
Java后端何哥6 分钟前
Docker Compose 和 Kubernetes(k8s)区别
docker·容器·kubernetes
GalaxyPokemon1 小时前
Muduo网络库实现 [十六] - HttpServer模块
linux·运维·服务器·网络
Zfox_1 小时前
Git 进阶之路:高效协作之分支管理
大数据·linux·运维·c++·git·elasticsearch
夏天里的肥宅水1 小时前
解决方案:远程shell连不上Ubuntu服务器
linux·运维·服务器·ubuntu
牛角上的男孩1 小时前
使用QEMU(8.2.10)调试ARM64 Linux内核6.6.30
linux·运维·服务器
别致的影分身2 小时前
Docker Image(镜像)
运维·docker·容器
李菠菜2 小时前
优化Centos关闭SELinux/Swap及资源限制调整
linux·后端·centos
爱莉希雅&&&2 小时前
Linux论坛安装
linux·运维·服务器
眠りたいです3 小时前
Linux-网络基础
linux·运维·服务器·网络·c++·进程间通信