Reputation: 215
I have one project base on asp.net 4.5, now I want run it in Docker. As far as I am known, only asp.net 5 be supported this moment, so has any way let me run my project in Docker?
Upvotes: 5
Views: 3673
Reputation: 19279
There are two approaches depending on whether you want to run Linux or Windows containers. For Linux containers, you'd have to port your app to Mono, as laid out by @luiz-carlos-faria
To run in Windows Docker containers, you'd have to create a 4.6/4.5 base image similar to this one: https://github.com/Microsoft/Virtualization-Documentation/blob/master/windows-container-samples/windowsservercore/dotnet35/Dockerfile
You can run that on Windows Server 2016 TP5 (free download) in a VM.
Upvotes: 0
Reputation: 274
You must read Mono documentation about ASP.NET MVC Support. Mono can handle your needs, running under Docker Linux Containers. Using Windows Containers (new feature becomes with Windows Server 2016) you will do that without any trick. About Mono and Docker, that was useful, stable and can solve your requirements, depends exclusivelly what you are using in your project to understand that is compactible with mono runtime.
Mono Docker repository on Github
Enjoy and tell us about your experiences.
Upvotes: 2