Docker安装——Ubuntu (Jammy 22.04)

一、为什么要用 Ubuntu?(centos和ubuntu有什么区别)

使用lsb_release命令:lsb_release -a ,即可查看ubantu的版本,但是为什么要使用ubantu 呢?

区别:1、centos基于EHEL开发,而ubuntu基于Debian开发;2、centos使用rpm和flatpak软件包,而ubuntu使用deb和snap的软件包;3、centos使用yum来更新,而ubuntu使用apt来更新。

centos和ubuntu区别详解

但是个人觉得的centos未来使用的趋势可能会越来越少了 。

二、Ubuntu (Jammy 22.04)安装 Docker

参考自官方文档:Install Docker Engine on Ubuntu | Docker Docs

①、apt-get update

②、apt-get -y install apt-transport-https ca-certificates curl software-properties-common

③、curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

④、add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

⑤、apt-get -y update

⑥、apt-get -y install docker-ce

查看是否已安装

若要安装指定版本的 docker-ce

查找Docker-CE的版本:apt-cache madison docker-ce

安装指定版本的Docker-CE:sudo apt-get -y install docker-ce=VERSION

相关推荐
tokepson1 天前
Mysql下载部署方法备份(Windows/Linux)
linux·服务器·windows·mysql
追逐时光者1 天前
一个致力于为 C# 程序员提供更佳的编码体验和效率的 Visual Studio 扩展插件
后端·c#·visual studio
韩师学子--小倪1 天前
fastjson与gson的toString差异
java·json
Drawing stars1 天前
JAVA后端 前端 大模型应用 学习路线
java·前端·学习
nbsaas-boot1 天前
SQL Server 存储过程开发规范(公司内部模板)
java·服务器·数据库
行百里er1 天前
用 ThreadLocal + Deque 打造一个“线程专属的调用栈” —— Spring Insight 的上下文管理术
java·后端·架构
C_心欲无痕1 天前
Dockerfile:构建 Docker 镜像
运维·docker·容器
玄〤1 天前
黑马点评中 VoucherOrderServiceImpl 实现类中的一人一单实现解析(单机部署)
java·数据库·redis·笔记·后端·mybatis·springboot
zz_nj1 天前
工作的环境
linux·运维·服务器
J_liaty1 天前
Spring Boot拦截器与过滤器深度解析
java·spring boot·后端·interceptor·filter