本文介绍了错误:在等待与WordPress的Docker连接时,获取https://registry-1.docker.io/v2/:net / http:请求已取消的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Wordpress中有一个带有自定义模板的开发站点。所以我只有wp-content文件夹,因为它包含所有与模板相关的文件和插件。随着数据库转储。最后,在 docker-compose.yml中定义了正确的Wordpress图像,即MySQL版本。我有一个问题可以通过在此线程上发布来解决-

I have a developed site in Wordpress with a custom template. So i got only the wp-content folder since it contains all the template related files and plugins. With the Database dump. Finally defined the correct Wordpress image, MySQL versions in a "docker-compose.yml". There was an issue an i could able to fix that by posting it on this thread - ERROR: In file '.\docker-compose.yml', volume must be a mapping, not a string. - Docker with Wordpress

但是现在当我按照docker命令执行时,出现了此错误。

But now i'm getting this error when i executed following docker command.

docker-compose up -d

这是错误,

"ERROR: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"


推荐答案

能够通过在Docker中将Google DNS添加到Netwrok设置来解决此问题。确切值是:

Could able to fix this issue by adding Google DNS to Netwrok settings in Docker. Exact value is:

8.8.8.8

这篇关于错误:在等待与WordPress的Docker连接时,获取https://registry-1.docker.io/v2/:net / http:请求已取消的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!