Ubuntu上的Docker .Net Core应用程序不在localhost:8000中打开

我正在使用Ubuntu 16.04,我在Windows上有一个.Net Core的docker应用程序,并试图让它在Ubuntu上运行。 我有docker和.net核心运行没有错误。

当我运行“sudo docker-compose up”时,它运行服务器,正在监听“ http:// +:80” 。 但是我无法在浏览器中打开它。 在Windows上,我正在使用的每个人都可以在localhost:8000上加载它。

当我运行docker-compose时,这是我得到的:

sudo docker-compose up Starting webui Starting projects_api Starting profile_api Starting identity_api Attaching to projects_api, profile_api, webui, identity_api profile_api | Hosting environment: Development profile_api | Content root path: /app projects_api | Hosting environment: Development profile_api | Now listening on: http://+:80 projects_api | Content root path: /app profile_api | Application started. Press Ctrl+C to shut down. projects_api | Now listening on: http://+:80 projects_api | Application started. Press Ctrl+C to shut down. identity_api | info: Microsoft.Extensions.DependencyInjection.DataProtectionServices[0] identity_api | User profile is available. Using '/root/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest. identity_api | Hosting environment: Development identity_api | Content root path: /app identity_api | Now listening on: http://+:80 identity_api | Application started. Press Ctrl+C to shut down. 

现在,我已经尝试了这些方法,但在Windows上,他们使用Powershell脚本来ping服务器。 但我不知道如何将PowerShell转换为bash。 我想也许如果我把它转换成bash我可以运行应用程序。 这是据说运行服务器的powershell脚本:

  param( [string]$host_url = "http://localhost" ) @( "$host_url`:5001/api/health/ping", "$host_url`:5002/api/health/ping", "$host_url`:5003/api/health/ping", "$host_url`:5001/.well-known/openid-configuration" ) | ForEach-Object { Invoke-WebRequest -Uri $_ } | Select-Object StatusCode, StatusDescription, Content 

docker-compose up运行时,它会默认查找两个文件docker-compose.ymldocker-compose.override.yml 。 您docker-compose.ymldocker-compose.yml不指定任何映射,但是docker-compose.override.yml在主机容器中具有映射到主机上的500080 。 不知道你的同事如何在8080上触及UI,除非他们已经绘制了不同的东西。