【问题】
在进入docker镜像后,我们一般缺少vim,需要安装,但是在更新的过程中往往会卡在working 的进度为0上。
【解决方法】
mv /etc/apt/sources.list /etc/apt/sources.list.bak
-
echo "deb http://mirrors.163.com/debian/ jessie main non-free contrib" >/etc/apt/sources.list -
echo "deb http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list -
echo "deb-src http://mirrors.163.com/debian/ jessie main non-free contrib" >>/etc/apt/sources.list -
echo "deb-src http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list -
#更新安装源 -
apt-get update
apt-get install -y vim
Docker 官方中国区:https://registry.docker-cn.com 网易:http://hub-mirror.c.163.com 中国科技大学:https://docker.mirrors.ustc.edu.cn 阿里云:https://y0qd3iq.mirror.aliyuncs.com |