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

相关推荐
网硕互联的小客服2 分钟前
如何解决 Linux 文件系统挂载失败的问题?
linux·服务器·前端·网络·chrome
贝锐2 分钟前
多设备可视化管理,向日葵屏幕墙如何塑造IT设备管理范式
运维·远程工作
Victor3565 分钟前
Redis(125)Redis在社交网络中的应用有哪些?
后端
oliveira-time6 分钟前
单例模式中的饿汉式
java·开发语言
门思科技8 分钟前
主流 LoRaWAN 网络服务器深度对比:ThinkLink、TTS、ChirpStack、Loriot 与 Actility 选型指南
运维·服务器·网络
Victor3568 分钟前
Redis(124)Redis在电商系统中的应用有哪些?
后端
凌波粒9 分钟前
SpringMVC基础教程(1)--MVC/DispathcerServlet
java·spring·mvc
武子康9 分钟前
Java-173 Neo4j + Spring Boot 实战:从 Driver 到 Repository 的整合与踩坑
java·数据库·spring boot·后端·spring·nosql·neo4j
凌波粒11 分钟前
SpringMVC基础教程(2)--Controller/RestFul风格/JSON/数据转发和重定向
java·后端·spring·json·restful
老鼠只爱大米1 小时前
Java 设计模式之适配器模式:系统集成的万能接口
java·设计模式·适配器模式·adapter·java设计模式