阿里云镜像源官方配置: https://developer.aliyun.com/mirror/ubuntu?spm=a2c6h.13651102.0.0.3e221b11PKzYs6
清华镜像源官方配置: https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
/www/server/sources.list
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
docker pull ubuntu
# 设置apt为阿里镜像源
docker run -v /www/server/sources.list:/etc/apt/sources.list --name ubuntu -it ubuntu:latest /bin/bash
# 更新软件列表
apt update
# 安装vim编辑器
apt -y install vim
# 安装ifconfig命令
apt -y install net-tools
docker pull ubuntu
docker run --name ubuntu -it ubuntu:latest /bin/bash
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/weixin_39651356/article/details/125921052
内容来源于网络,如有侵权,请联系作者删除!