惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
MongoDB | Blog
MongoDB | Blog
Google DeepMind News
Google DeepMind News
L
LangChain Blog
J
Java Code Geeks
MyScale Blog
MyScale Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
WordPress大学
WordPress大学
小众软件
小众软件
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
月光博客
月光博客
aimingoo的专栏
aimingoo的专栏
F
Fortinet All Blogs
I
InfoQ
博客园 - 聂微东
量子位
A
About on SuperTechFans
S
SegmentFault 最新的问题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
Hugging Face - Blog
Hugging Face - Blog
云风的 BLOG
云风的 BLOG
H
Help Net Security

灰叶的笔记

Linux逻辑卷2-扩容/常用命令汇总 | 灰叶的笔记 Dockerfile 容器镜像构建 | 灰叶的笔记 Linux 查看内存和实际物理内存大小不一致 | 灰叶的笔记 GCP创建泛域名证书(域名托管在CloudFlare) | 灰叶的笔记 Docker基础指令-镜像相关 | 灰叶的笔记 Docker基础指令-容器相关 | 灰叶的笔记 GCP和AWS使用PCCW专线互联 | 灰叶的笔记 使用 OpenTelemetry 采集日志推送至 GCP Cloud Logging | 灰叶的笔记 vim编辑器常用操作 | 灰叶的笔记 Linux主机是否被入侵的11个排查步骤 | 灰叶的笔记 Fail2Ban-Linux防SSH暴力破解工具 | 灰叶的笔记 公用云Linux快照创建磁盘挂载问题 | 灰叶的笔记 ubuntu 安装图形化桌面 | 灰叶的笔记 iptables基础命令与filter表相关命令 | 灰叶的笔记 Linux逻辑卷 | 灰叶的笔记 UCloud CentOS6.X修改hostname | 灰叶的笔记 软件源安装Dokcer | 灰叶的笔记 Ubuntu系统启用root用户ssh远程登录 | 灰叶的笔记 Windows Server关闭IE增强 | 灰叶的笔记 windows云服务器开启媒体声音 | 灰叶的笔记 MySQL5.7多实例部署 | 灰叶的笔记 nc网络工具 | 灰叶的笔记 WinServer2008云服务器系统盘可压缩空间不足 | 灰叶的笔记 Rocky Linux8.5 UCloud官方镜像进入单用户模式 | 灰叶的笔记 UCloud官方Linux 镜像进入单用户模式汇总 | 灰叶的笔记 Debian10 UCloud官方镜像进入单用户模式 | 灰叶的笔记 CentOS6 UCloud官方镜像进入单用户模式 | 灰叶的笔记 CentOS7/8 UCloud官方镜像进入单用户模式 | 灰叶的笔记 Ubuntu UCloud官方镜像进入单用户模式 | 灰叶的笔记 几个检查本机的网络连接的工具(linux) | 灰叶的笔记
Ubuntu 安装 Docker-CE | 灰叶的笔记
huiye · 2024-09-03 · via 灰叶的笔记

step1:卸载可能会导致冲突的包

# for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done

step2:安装一些必要的系统工具

# sudo apt-get update
# sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common

step3: 安装 GPG 证书

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

step4: 写入软件源信息

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

step5:安装 Docker-CE(下面两步根据实际需要选择)

step5-1:安装最新版本 Docker-CE

# sudo apt-get -y update
# sudo apt-get -y install docker-ce

step5-2:安装指定版本

# 查找Docker-CE的版本:
# apt-cache madison docker-ce
docker-ce | 5:27.2.0-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:27.1.2-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:27.1.1-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:27.1.0-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:27.0.3-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:27.0.2-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:27.0.1-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:26.1.4-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:26.1.3-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:26.1.2-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:26.1.1-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:26.1.0-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:26.0.2-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:26.0.1-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages
docker-ce | 5:26.0.0-1~ubuntu.24.04~noble | https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble/stable amd64 Packages

# 安装指定版本的Docker-CE: (VERSION例如上面的 5:27.2.0-1~ubuntu.24.04~noble)
# sudo apt-get -y install docker-ce=[VERSION]

step6:启动并验证

# systemctl start docker
# docker version

Ubuntu 安装 Docker-CE