All the demo I saw lately are oriented Asp.net core (I am not sure how it's stable and functional, as it didn't contain all asp.net features), as Windows server 2016 support containers (and docker), should we be able to deploy an asp.net mvc 4.0 app ?
Asked
Active
Viewed 2,524 times
1 Answers
5
Yes.
You can use microsoft/windowsservercore
or microsoft/iis
as a base image, install full ASP.NET and run your 'legacy' .NET apps in containers on Windows. You can do it now with Windows 10 and Server 2016 TP5, but the RTM (expected next week at Ignite) should be more stable.
I've shown this by Dockerizing the old Nerd Dinner showcase app. You end up with a Docker image that's 3GB so you won't get all the benefits of having a small, efficient image - but you can run your app in a container, and that's a starting point for breaking down monoliths.
For reference, this is what the Dockerfile for a compiled ASP.NET app looks like:
FROM microsoft/iis
RUN ["powershell.exe", "Install-WindowsFeature NET-Framework-45-ASPNET"]
RUN ["powershell.exe", "Install-WindowsFeature Web-Asp-Net45"]
ADD web-app/ c:\\web-app
EXPOSE 8081
RUN powershell New-Website -Name 'web-app' -Port 8081 -PhysicalPath 'c:\web-app' -ApplicationPool '.NET v4.5'
ENTRYPOINT powershell

Elton Stoneman
- 17,906
- 5
- 47
- 44
-
1Thanks Elton, I tried with the basic asp.net MVC 4 project, and it didn't work for me (404 when I try to access to the website), when I check the state of the website it's started... I guess it's the joy of IIS – rad Sep 23 '16 at 16:19