
由于网络原因,国内用户访问 Docker Hub 下载镜像的速度可能比较慢。为了提升下载速度,可以使用国内的 Docker 镜像加速器。以下是几个常用的选择:
1. 阿里云镜像加速器
- 阿里云容器镜像服务提供了免费的镜像加速服务,可以显著提升 Docker 镜像下载速度。
- 你需要先注册一个阿里云账号,然后在容器镜像服务控制台获取加速器地址。
- 具体配置方法可以参考阿里云官方文档:https://help.aliyun.com/document_detail/60750.html
2. DaoCloud 镜像加速器
- DaoCloud 也提供了免费的 Docker 镜像加速器服务。
- 你需要先注册一个 DaoCloud 账号,然后在控制台获取加速器地址。
- 具体配置方法可以参考 DaoCloud 官方文档:https://www.daocloud.io/mirror#accelerator-doc
3. 网易云镜像加速器
- 网易云容器镜像服务也提供免费的镜像加速服务。
- 你需要先注册一个网易云账号,然后在容器镜像服务控制台获取加速器地址。
- 具体配置方法可以参考网易云官方文档。
4. 腾讯云镜像加速器
- 腾讯云容器镜像服务也提供免费的镜像加速服务。
- 你需要先注册一个腾讯云账号,然后在容器镜像服务控制台获取加速器地址。
- 具体配置方法可以参考腾讯云官方文档。
5. 七牛云镜像加速器
- 七牛云容器镜像服务也提供免费的镜像加速服务。
- 你需要先注册一个七牛云账号,然后在容器镜像服务控制台获取加速器地址。
- 具体配置方法可以参考七牛云官方文档。
如何配置 Docker 镜像加速器:
- 不同的操作系统配置方法有所不同,具体可以参考对应镜像加速器的官方文档。
- 一般来说,需要修改 Docker 的配置文件 daemon.json,添加镜像加速器的地址。
需要注意的是:
- 不同镜像加速器的加速效果可能会有所差异,建议根据自己的网络情况选择合适的加速器。
- 一些镜像加速器可能会限制免费用户的流量或下载速度。
- 使用镜像加速器可能会带来一些安全风险,建议选择信誉良好的服务提供商。

步骤:
-
备份原始文件: 在修改之前,最好备份一下原始的 docker.list 文件,以便出现问题时可以恢复:
sudo cp /etc/apt/sources.list.d/docker.list /etc/apt/sources.list.d/docker.list.bak
-
编辑 docker.list 文件: 使用你喜欢的文本编辑器打开 docker.list 文件:
sudo nano /etc/apt/sources.list.d/docker.list
-
添加国内源:
将以下内容添加到 docker.list 文件中,替换掉原有的内容(如果存在)。可以选择其中一个源:
-
阿里云:
deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu focal stable
-
清华大学:
deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu focal stable
-
网易:
deb [arch=amd64] http://mirrors.163.com/docker-ce/linux/ubuntu focal stable
注意:
- 将 focal 替换为你正在使用的 Ubuntu 版本代号。可以使用 lsb_release -cs 命令查看。
- 建议选择地理位置上离你最近的镜像源,以获得更快的下载速度。
-
-
更新软件包列表并安装 Docker:
sudo apt update sudo apt install docker-ce docker-ce-cli containerd.io
-
验证安装:
sudo docker run hello-world
如果 Docker 安装成功,你将看到 "Hello from Docker!" 的输出信息。
现在,你已经成功配置了国内源,并可以使用 apt 命令安装和管理 Docker 了。

国内常见镜像站点
Debian全球镜像站列表:https://www.debian.org/mirror/list 。
下面列出国内常用的镜像站点及 /etc/apt/sources.list 中的具体对应内容:
阿里云镜像站
deb https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib
腾讯云镜像站
deb https://mirrors.tencent.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.tencent.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.tencent.com/debian-security/ bookworm-security main
deb-src https://mirrors.tencent.com/debian-security/ bookworm-security main
deb https://mirrors.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib
网易镜像站
deb https://mirrors.163.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.163.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.163.com/debian-security/ bookworm-security main
deb-src https://mirrors.163.com/debian-security/ bookworm-security main
deb https://mirrors.163.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.163.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.163.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.163.com/debian/ bookworm-backports main non-free non-free-firmware contrib
华为镜像站
deb https://mirrors.huaweicloud.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.huaweicloud.com/debian-security/ bookworm-security main
deb-src https://mirrors.huaweicloud.com/debian-security/ bookworm-security main
deb https://mirrors.huaweicloud.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.huaweicloud.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ bookworm-backports main non-free non-free-firmware contrib
清华大学镜像站
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
中科大镜像站
deb https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware

- Workstation Pro 17.6.3 下载 (适用于 Windows 桌面上的虚拟化)
- Fusion Pro 13.6.3 下载 (适用于 Mac OS 桌面上的虚拟化)
注意:只有这两个最新版本以及以后的版本才支持个人使用 (Personal Use) 免费许可。以 Workstation Pro 为例,在第一次启动时会要求你输入 license key,对于个人用户而言,你只需要选 Personal Use 就可以免费使用了。

需要注意的是,Workstation Pro 和 Fusion Pro 的免费仅适用于非商业用途,VMware 对于个人使用和商业用途的定义如下:
- 个人使用: Workstation 或 Fusion 安装到电脑后,被用于运行非商业目的的虚拟机。个人使用明确排除将产品用于商业目的,包括经营或运营企业、组织、政府组织或教育机构等。
- 商业用途:企业许可允许将产品用于商业目的,包括经营或运营企业、组织、政府组织或教育机构等。
把 Workstation Pro 和 Fusion Pro 用于商业用途的话需要购买企业许可。

rspamd : Depends: libc++1-16 (>= 1:16.0.0~++20230308013049+7b4e71bcf991) but it is not installable
Depends: libc++abi1-16 (>= 1:16.0.0~++20230308013049+7b4e71bcf991) but it is not installable
Depends: libunwind-16 (>= 1:16.0.0~++20230308013049+7b4e71bcf991) but it is not installable
E: Unable to correct problems, you have held broken packages.
chmod +x llvm.sh
sudo ./llvm.sh 16
sudo apt install libc++-16-dev libc++abi-16-dev libunwind-16-dev