1. First into the container


docker exec -it bash

2. Enter the apt get configuration directory


cd /etc/apt

3. Execute the backup command


cp sources.list sources.list.bak

4. View version


cat /etc/os-release

5. Select the source of the corresponding version, execute all the following echo commands, and modify it to a domestic image source [163 Image: https://mirrors.163.com/.help/debian.html


 echo "">sources.list echo "deb  http://mirrors.163.com/debian/  buster main non-free contrib">>sources.list echo "deb  http://mirrors.163.com/debian/  buster-updates main non-free contrib">>sources.list echo "deb  http://mirrors.163.com/debian/  buster-backports main non-free contrib">>sources.list echo "deb-src  http://mirrors.163.com/debian/  buster main non-free contrib">>sources.list echo "deb-src  http://mirrors.163.com/debian/  buster-updates main non-free contrib">>sources.list echo "deb-src  http://mirrors.163.com/debian/  buster-backports main non-free contrib">>sources.list echo "deb  http://mirrors.163.com/debian-security/  buster/updates main non-free contrib">>sources.list echo "deb-src  http://mirrors.163.com/debian-security/  buster/updates main non-free contrib">>sources.list

6. Check whether the file is modified successfully


cat sources.list

7. Update apt get


apt-get update

8. Installation vim


apt-get install vim