我在容器内的wordpress无法连接到Internet,因此,如果我执行安装插件之类的操作,则会收到以下错误消息:
“Installation failed: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.”.
有人帮我吗?我认为它需要一些网络选项……我使用docker而不是docker-compose,并使用以下命令运行实例:
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql:5.7
docker run --name wordpress --link mysql -p 80:80 -d wordpress
可以,但wordpress无法连接到Internet。
如果有用的话,我在Docker内部配置了一个代理。
非常感谢你。
最佳答案
如果Docker引擎使用代理服务器,则以下标志可以解决问题:
--network=host
关于wordpress - Docker中的Wordpress无法连接到Internet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53279209/