Docker Community Forums

Share and learn in the Docker community.

Asp.net 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
EXPOSE 8081
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.