docker-compose:权限被拒绝错误:调出ASP.NET Core 2.2项目时遇到错误

时间:2019-05-22 15:32:23

标签: docker docker-compose external connectivity asp.net-core-2.2

我试图通过使用docker-compose和

在MS Windows 10 Pro Linux docker映像/容器上构建并运行

https://github.com/JasonGT/NorthwindTraders/blob/master/docker-compose.yml https://github.com/JasonGT/NorthwindTraders/blob/master/Northwind.WebUI/Dockerfile

来自

https://github.com/JasonGT/NorthwindTraders

 >docker-compose up

失败:

...
Creating northwindtraders-master_data.sql_1 ... done
Creating northwindtraders-master_northwind_1 ... error

ERROR: for northwindtraders-master_northwind_1  Cannot start service northwind: driver failed programming 
 external connectivity on endpoint northwindtraders-master_northwind_1   (9db694c218ad8d10dee00d597624e3ede6dd1312ab70ea5e664f6dd8c9ca7764): 
 Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error Permission denied

ERROR: for northwind  Cannot start service northwind: driver failed programming external connectivity 
 on endpoint northwindtraders-master_northwind_1 (9db694c218ad8d10dee00d597624e3ede6dd1312ab70ea5e664f6dd8c9ca7764): 
  Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error 
  Permission denied ERROR: Encountered errors while bringing up the project.

运行时:

>docker-compose ps

它产生以下输出:

               Name                            Command              State             Ports
----------------------------------------------------------------------------------------------------
northwindtraders-master_data.sql_1    /opt/mssql/bin/sqlservr      Up         0.0.0.0:5433->1433/tcp
northwindtraders-master_northwind_1   dotnet Northwind.WebUI.dll   Exit 128

我应该如何编辑

https://github.com/JasonGT/NorthwindTraders/blob/master/docker-compose.yml https://github.com/JasonGT/NorthwindTraders/blob/master/Northwind.WebUI/Dockerfile

还是通过使用其他选项来解决此问题而以其他方式运行docker-compose?

1 个答案:

答案 0 :(得分:1)

我和你有同样的问题。

通过在Win10上创建一个供docker运行的用户来解决此问题。然后,我必须与docker用户共享项目文件夹(完全控制)。它成功了。

确保docker使用了该用户帐户(请在docker上进行检查>设置)