Docker Community Forums

Share and learn in the Docker community. mvc4 docker container

(Harshitwipro) #1

I need to dockerize ASP.NET MVC 4 application. but wh

below dockerfile i am using for the same.

FROM microsoft/iis
SHELL [“powershell”] RUN “Install-WindowsFeature NET-Framework-45-ASPNET”
SHELL [“powershell”] RUN “Install-WindowsFeature Web-Asp-Net45”
COPY . c:\web-app
SHELL [“powershell”] RUN New-Website -Name ‘my-app’ -Port 8081 -PhysicalPath ‘c:\web-app’ -ApplicationPool ‘.NET v4.5′
ENTRYPOINT powershell
CMD Write-Host IIS Started… ; \
while ($true) { Start-Sleep -Seconds 3600 }

docker build . -t ramiramilu/aspnetapp
docker run -d -p 8081:8081 ramiramilu/aspnetapp

but when I hit localhost:8081 from my browser it keeps on loading with no response.


Hi @harshitwipro, m also facing same issue. any luck you have got. If its working for you, can you please guide me as well to resolve the same.