当前位置: 首页 > article >正文

Deepin 23.10安装Docker

个人博客地址:Deepin 23.10安装Docker | 一张假钞的真实世界

Deepin 是基于 Debian 的国产 Linux 发行版,安装 Docker Desktop 可能会遇到兼容性问题,因为 Docker Desktop 官方主要支持 Ubuntu/Debian/Red Hat/Fedora/Arch 等主流发行版,所以选择安装 Docker Engine。

  • 卸载旧版本(如有)
sudo apt remove docker.io docker-doc docker-compose podman-docker containerd runc
  • 安装依赖
sudo apt update
sudo apt install -y ca-certificates curl gnupg lsb-release
  • 添加 Docker 官方 GPG 密钥
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  • 添加 Docker 源

由于 Deepin 基于 Debian,可以使用 Debian 的 Docker 源(需匹配 Deepin 版本对应的 Debian 版本)。

查看Deepin对应的Debian版本:

$ cat /etc/debian_version
bookworm/sid

执行以下命令添加 Docker 源:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  • 安装 Docker Engine
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
  • 启动 Docker
sudo systemctl enable --now docker
  • 允许普通用户运行 Docker
sudo usermod -aG docker $USER
newgrp docker  # 重新加载用户组

可能需要重启电脑。

  • 测试 Docker

sudo docker run hello-world

需先配置国内镜像源。现在可用的镜像源越来越少了,推荐一篇良心博文:https://zhuanlan.zhihu.com/p/24461370776。

安装成功的验证结果信息如下:

$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
e6590344b1a5: Pull complete 
Digest: sha256:dd01f97f252193ae3210da231b1dca0cffab4aadb3566692d6730bf93f123a48
Status: Downloaded newer image for hello-world:latestHello from Docker!
This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(amd64)3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID:https://hub.docker.com/For more examples and ideas, visit:https://docs.docker.com/get-started/

Deepin 20.9 社区版安装 Docker 见文章:Deepin 20.9 社区版安装 Docker。

DockerHub 镜像源配置见文章:Linux 配置 DockerHub 镜像源配置。

Docker Compose 安装见文章:Linux 系统 Docker Compose 安装。

http://www.lryc.cn/news/2395217.html

相关文章:

  • 使用PowerBI个人网关定时刷新数据
  • 数字人引领政务新风尚:智能设备助力政务服务
  • 深入剖析Java类加载机制:双亲委派模型的突破与实战应用
  • Kotlin JVM 注解详解
  • 将 node.js 项目作为后台进程持续运行
  • 【PhysUnits】15.5 引入P1后的标准化表示(standardization.rs)
  • MySQL-5.7 修改密码和连接访问权限
  • tauri2项目打开某个文件夹,类似于mac系统中的 open ./
  • 企业文件乱、传输慢?用群晖 NAS 构建安全高效的共享系统
  • 防爆手机VS普通手机,区别在哪里?
  • C语言结构体的别名与创建结构体变量
  • 在RTX5060Ti上进行Qwen3-4B的GRPO强化微调
  • SQL进阶之旅 Day 7:视图与存储过程入门
  • 武汉火影数字VR大空间制作
  • Docker部署项目无法访问,登录超时完整排查攻略
  • (增强)基于sqlite、mysql、redis的消息存储
  • Windows上用FFmpeg推流及拉流的流程概览
  • MFC坦克大战游戏制作
  • Kafka ACK机制详解:数据可靠性与性能的权衡之道
  • VulnStack|红日靶场——红队评估四
  • 数据库 | 时序数据库选型
  • 网络拓扑如何跨网段访问
  • CppCon 2014 学习第1天:An SQL library worthy of modern C++
  • 【LLM相关知识点】 LLM关键技术简单拆解,以及常用应用框架整理(二)
  • 数据分析与应用-----使用scikit-learn构建模型
  • 003 flutter初始文件讲解(2)
  • Windows系统下 NVM 安装 Node.js 及版本切换实战指南
  • 基于热力学熵增原理的EM-GAM
  • 2025.05.28-华为暑期实习第一题-100分
  • 鸿蒙OSUniApp滑动锁屏实战:打造流畅优雅的移动端解锁体验#三方框架 #Uniapp