Docker Community Forums

Share and learn in the Docker community.

Docker Windows Container 403 - Forbidden: Access is Denied


(Martineza79) #1

I have created an image using the following script in my Dockerfile, but when I browse using the container’s IP Address and port(2000), I get a 403 - Forbidden: Access is denied. I am using Windows 10.0.14393 Build 14393, Docker for Windows. The project is an ASP.NET 4.5.2 solution containing Nancy, Entity Framework, AngularJS, and SQL Server projects. Do I need to make any configuration changes to my IIS, Docker, Powershell, etc.? My Dockerfile script is:

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'