dockerfile builds image error ERROR [internal] load metadata for docker.io/library/php:7.4-apache

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

Insert image description here 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

Insert image description here 

Information link: http://www.xbhp.cn/news/159579.html 

Guess you like

Origin blog.csdn.net/qq_37865672/article/details/131919182