Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress Docker:意外错误(使用失败)_Wordpress_Docker - Fatal编程技术网

Wordpress Docker:意外错误(使用失败)

Wordpress Docker:意外错误(使用失败),wordpress,docker,Wordpress,Docker,我对Docker真的很陌生。我试图运行Wordpress,但我遇到了一个错误 $ docker-compose up -d testpublichtml_mariadb_1 is up-to-date Starting 00b4dc8e3264_testpublichtml_wordpress_1 ERROR: for wordpress Cannot start service wordpress: driver failed programming external connectivi

我对Docker真的很陌生。我试图运行Wordpress,但我遇到了一个错误

$ docker-compose up -d
testpublichtml_mariadb_1 is up-to-date
Starting 00b4dc8e3264_testpublichtml_wordpress_1

ERROR: for wordpress  Cannot start service wordpress: driver failed programming external connectivity on endpoint 
00b4dc8e3264_testpublichtml_wordpress_1 (63165c221c0b2b11d513e97d35afa39146790086115029b9bb229212d0c8c06a): Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error (Failure EADDRINUSE)
ERROR: Encountered errors while bringing up the project.
$
我的猜测是尝试检查端口80上是否有东西,尽管我不知道如何检查

当我输入
netstat-tulnp | grep':80'
时,我得到:

$ netstat -tulnp | grep ':80'
netstat: option requires an argument -- p
Usage:  netstat [-AaLlnW] [-f address_family | -p protocol]
netstat [-gilns] [-f address_family]
netstat -i | -I interface [-w wait] [-abdgRtS]
netstat -s [-s] [-f address_family | -p protocol] [-w wait]
netstat -i | -I interface -s [-f address_family | -p protocol]
netstat -m [-m]
netstat -r [-Aaln] [-f address_family]
netstat -rs [-s]

可能您在端口80上运行了一些服务。要检查这一点,请执行以下命令

netstat-tulnp | grep:80'

最后一列是进程的PID/程序名。如果要杀死它,请使用以下命令

kill PID


之后,您应该能够启动您的容器。

可能您在端口80上运行了一些服务。要检查这一点,请执行以下命令

netstat-tulnp | grep:80'

最后一列是进程的PID/程序名。如果要杀死它,请使用以下命令

kill PID


之后,您应该能够启动容器。

当我输入
kill PID
时,我得到
-bash:kill:PID:参数必须是进程或作业ID
您不必输入PID这个词。必须用PID word替换
netstat-tulnp | grep':80'
输出的最后一列的值。请验证答案是否解决了您的问题。我不确定“最后一列”是什么意思。我在问题中添加了输入此命令时收到的消息。您使用的是哪个发行版?确保您以root用户身份执行该命令。当我输入
kill PID
时,我得到
-bash:kill:PID:参数必须是进程或作业ID
,您不必输入单词PID。必须用PID word替换
netstat-tulnp | grep':80'
输出的最后一列的值。请验证答案是否解决了您的问题。我不确定“最后一列”是什么意思。我在问题中添加了输入此命令时收到的消息。您使用的是哪个发行版?确保以root用户身份执行该命令。