.net core 部署到 docker中 访问链接超时

usbook 2018-07-12 15:31:48

小白一枚,无法访问,iis 是可以访问的

,我访问 后

回帖列表
usbook 2018-07-12 16:51:28

已解决, Docker for Windows makes whatever is running on port 80 in the container (in this case, nginx ) available on port 80 of localhost


我理解的是 我们在前面设置的开放端口没有效,如:FROM microsoft/dotnet:latest

COPY . /publish

WORKDIR /publish    

EXPOSE 8080

CMD ["dotnet", "tesat.dll"]

我们只可以设置主机访问的端口,即: docker run -p 8010:80 --name w4ebsser1svers hellowebapp.57,设置为主机使用8010端口 来访问docker容器的80端口,就 ok了


usbook 2018-07-12 15:33:41

对了,我是 装在windows 上的,没有配置Hyper-V




1/ 1
蝉知2.0