尝试通过本地主机连接到docker集装箱

我有一个为laravel运行nginx和php-fpm的图像设置,我知道这个图像正在工作,因为我在现场服务器和本地Ubuntu上使用它。 我的问题是,我转换到Linux mint,并使用相同的命令

那是docker run --name social-server -itd -v ~/Desktop/nginx/conf/:/etc/nginx/sites-enabled -v ~/Desktop/nginx/logs/:/var/log/nginx --link social-db:mysql -v ~/Desktop/dashboard:/app -v ~/Desktop/secv/:/ssl -p 80:80 -p 443:443 php-base

由于某种原因,我不能得到它从localhost在浏览器连接。

检查了nginx的日志,他们没有被写入(不是erroraccess ),所以它没有连接到一般的容器

编辑:错误在浏览器中得到

 This site can't be reached The connection was reset. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_RESET ReloadHIDE DETAILS 

预先感谢您的帮助

编辑

我已经分解了运行命令,发现只有当我添加-v ~/Desktop/nginx/conf:/etc/nginx/sites-enabled

正如它在编辑中说,我打破了运行命令,发现它是-v ~/Desktop/nginx/conf:/etc/nginx/sites-enabled为什么这是我不知道,但我把它拿出来,一切工作正常…我将简单地使用容器中的/ etc / nginx / sites-available / default并编辑它以使其工作。 谢谢你的帮助