When using dockerfile to build the image, I encountered an error ERROR [internal] load metadata for docker.io/library/php:7.4-apache
Solution
Change mirror source
View the image source set by docker
docker info
Create or modify the /etc/docker/daemon.json file
{"registry-mirrors": ["https://registry.hub.docker.com","http://hub-mirror.c.163.com","https://docker.mirrors.ustc.edu.cn","https://registry.docker-cn.com"]
}
Reload Docker
systemctl restart docker
Check if it takes effect
docker info
Information link: http://www.xbhp.cn/news/159579.html