Docker Community Forums

Share and learn in the Docker community.

Access to the path is denied in Docker


(Hemkant) #1

I am trying to host an ASPNET.MVC application on Docker using a useful article here, I followed all the step as mentioned in the article but when access the site I am getting an error Access to the path is denied. I have one folder BinaryData which contains JSON file and that is used by the application.

And It is creating an issue in reading and writing in that folder. I am using Docker Version 17.12.0-ce-win47 (15139)


FROM microsoft/aspnet
COPY ./MVCDOCKER/ /inetpub/wwwroot

Any Help or pointer

(Hemkant) #2

After hrs of googling, I have managed to solve this issue here is my updated DockerFile.

FROM microsoft/aspnet
RUN New-Item c:\MVCAPP -type directory
WORKDIR /navientdxa
RUN Remove-WebSite -Name 'Default Web Site’
RUN New-Website -Name ‘DXADOCKER’ -Port 80 -PhysicalPath ‘c:\MVCAPP’ -ApplicationPool ‘.NET v4.5’