可选的备份操作
cp /etc/apt/sources.list.d/docker.list /etc/apt/sources.list.d/docker.list.bak
打开 docker 的镜像配置文件
nano /etc/apt/sources.list.d/docker.list
修改镜像源
国内个人用下来速度还不错的镜像地址:
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://mirrors.aliyun.com/docker-ce/linux/debian bookworm stable
官方,不适用于国内,此处仅用于存档以备不时之需:
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable
使新的镜像源生效
从新的软件源获取并更新包索引列表:
sudo apt update