docker 19 -ubuntu容器换源设置

以下通过正则替换的方式改为 aliyun 的镜像即可直接 update

sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
sed -i s@/security.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
apt clean
apt-get update -y

亲测有效

posted on 2021-01-18 16:05  进击的davis  阅读(740)  评论(0编辑  收藏  举报

导航