小白一枚,无法访问,iis 是可以访问的
,我访问 后
已解决, 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了
对了,我是 装在windows 上的,没有配置Hyper-V
已解决, 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了
对了,我是 装在windows 上的,没有配置Hyper-V