1、问题描述
在Docker容器中安装ubuntu镜像之后,默认使用的软件源是ubuntu的官网,速度非常慢,更新软件包经常报错
而且初始镜像默认没有安装vim命令,导致修改/etc/apt/sources.list
会很麻烦。
2、解决方案
使用sed
命令进行替换。
然后速度就起飞了,上面用的是阿里云的镜像,也可以换成其他的镜像源。
在Docker容器中安装ubuntu镜像之后,默认使用的软件源是ubuntu的官网,速度非常慢,更新软件包经常报错
而且初始镜像默认没有安装vim命令,导致修改/etc/apt/sources.list
会很麻烦。
使用sed
命令进行替换。
然后速度就起飞了,上面用的是阿里云的镜像,也可以换成其他的镜像源。
上一篇:Docker镜像是什么?
下一篇:Docker常用命令
anaconda环境配置一步到位
Ubuntu apt更换国内源 很多小伙伴在做实验的时候会用到Linux系统的虚拟,其中最常用
Ubuntu配置篇 | apt切换为国内源
Ubuntu16.04 配置国内源+安装 Docker国内源配置备份配置替换如下源信息执行如下脚本更新源列表安装
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M