apt源更新

docker很多镜像都用debian, 都是简配, 连个vim也没安装.

所以需要自己配置debian源.

docker cp xxxx:/etc/apt/sources.list ./
vim sources.list

------------------------------
deb http://mirrors.xxxxx/debian stretch main
deb http://mirrors.xxxxx/debian-security stretch/updates main
deb http://mirrors.xxxxx/debian stretch-updates main
------------------------------

docker cp sources.list xxxx:/etc/apt/sources.list

docker exec -it xxxx bash
apt update
apt install vim
原文地址:https://www.cnblogs.com/tekikesyo/p/12724408.html