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

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.xdnf.cn/news/744283.html

相关文章:

  • Go语言中的布尔类型详解
  • 截面动量策略思路
  • 内存管理 : 04段页结合的实际内存管理
  • Muduo网络库重点技术详解
  • tomcat服务器以及接受请求参数的方式
  • Java网络编程实战:TCP/UDP Socket通信详解与高并发服务器设计
  • uniapp uni-id Error: Invalid password secret
  • Linux531rsync定时同步 再回忆
  • 智能测试新范式:GenAI 与 Playwright MCP 如何重塑 QA 流程
  • 【Ubuntu】摸鱼技巧之虚拟机环境复制
  • C#WinForm程序时方法很多时Form.cs文件会很长,如何分别写入多个文件,partial class的作用体现出来了。
  • 矩阵快速幂算法快速上手
  • 极大似然估计例题——正态分布的极大似然估计
  • 尚硅谷redis7 99 springboot整合redis之连接集群
  • AppTrace 视角下 App 一键拉起:提升应用转化率的高效方案​
  • 使用Gemini, LangChain, Gradio打造一个书籍推荐系统 (第四部分)
  • 自动驾驶系列—Monocular 3D Lane Detection for Autonomous Driving
  • 【Web API系列】WebTransportSendStream接口深度解析:构建高性能实时数据传输的基石
  • Python实现P-PSO优化算法优化循环神经网络LSTM分类模型项目实战
  • 【技能拾遗】——家庭宽带单线复用布线与配置(移动2025版)
  • 【网络与信息安全】实验三 RSA加解密与签名验证
  • 澄清 STM32 NVIC 中断优先级
  • [网页五子棋][对战模块]实现游戏房间页面,服务器开发(创建落子请求/响应对象)
  • 中文NLP with fastai - Fastai Part4
  • 新视角!经济学顶刊QJE用文本分析探究新技术扩散
  • 简单cnn
  • go|channel源码分析
  • c# 如何中的 ? 与 ??
  • “粽”览全局:分布式系统架构与实践深度解析(端午特别版)
  • 《信号与系统》第 5 章 离散时间傅里叶变换