我在我的 中使用以下脚本创建了一个图像Dockerfile
,但是当我使用容器的 IP 地址和端口(2000)浏览时,我得到一个 403 - Forbidden: Access is denied。我正在使用 Windows 10.0.14393 Build 14393, Docker Desktop for Windows。该项目是一个包含 Nancy、Entity Framework、AngularJS 和 SQL Server 项目的 ASP.NET 解决方案。我是否需要对我的 IIS、Docker、Powershell 等进行任何配置更改?我的 Dockerfile 脚本是:
FROM microsoft/aspnet:windowsservercore
# using powershell commands
SHELL ["powershell"]
# location of the source directory
WORKDIR C:/src/Project
# run project using port 2000
RUN Remove-Website -Name 'Default Web Site'; \
New-Website -Name 'Project' -Port 2000 -PhysicalPath 'C:/src/Project'