Docker use tutorial related series catalog
problem
After creating the basic container, when we enter the container and edit the configuration file, we need to use vim or vi commands, but it will appear:
这是因为vim没有安装。
solution
Use the following command to install:
apt-get update
apt-get install vim
Then it's ok.
If the installation is still abnormal at this time
root@446d7cf1606c:/etc/mysql# apt-get update
Err:1 http://security.debian.org/debian-security buster/updates InRelease
Temporary failure resolving 'security.debian.org'
Err:2 http://repo.mysql.com/apt/debian buster InRelease
Temporary failure resolving 'repo.mysql.com'
Err:3 http://deb.debian.org/debian buster InRelease
Temporary failure resolving 'deb.debian.org'
0% [Connecting to deb.debian.org]
Err:4 http://deb.debian.org/debian buster-updates InRelease
Temporary failure resolving 'deb.debian.org'
Reading package lists... Done
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://repo.mysql.com/apt/debian/dists/buster/InRelease Temporary failure resolving 'repo.mysql.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@446d7cf1606c:/etc/mysql#
We can see from the exception that the installation cannot find the source.
Solution:
sudo systemctl restart docker
That's right, just restart docker. The purpose is to restart the source...and so on configuration files, and then download the docking interface again.
No problem.
Refer to this blogger's solution: