Deploy your ASP.NET 5 App to a Docker Container in five minutes

Sign in to queue

The Discussion

  • User profile image
    HamedMosavi

    Why would someone want to host Docker in a VM in Azure? I mean the whole point of using Docker is to get rid of VMs, right?

    My understanding is that if I want to use a cheap open source cloud instead of Azure, I'd use containers (like Docker) on top of a Linux (or better yet CoreOS) machine which allows me to scale and at the same time to save costs and still have many of the benefits of cloud. Moreover, I don't have to deal with VMs anymore because this is an improved architecture over old VM style.

    Now if I want to host my website in Azure, I'd just publish to Azure. I bet it will be MUCH easier without the Docker and Linux stuff in between and it probably performs much better.

    So, my question is what is the point of this video?

  • User profile image
    HamedMosavi

    BTW, If you're doing this for the benefit of isolated apps, then Asp.Net 5 is already providing that, right?

  • User profile image
    Dan

    , HamedMosavi wrote

    Why would someone want to host Docker in a VM in Azure? I mean the whole point of using Docker is to get rid of VMs, right?

    No, that's not the point of Docker, watch my Docker overview video, but there's a number of benefits - portability, density, production realism. 

    My understanding is that if I want to use a cheap open source cloud instead of Azure, I'd use containers (like Docker) on top of a Linux (or better yet CoreOS) machine which allows me to scale and at the same time to save costs and still have many of the benefits of cloud

    I don't know what a cheap open source cloud is, but whether it's Azure or another cloud vendor or Linux or CoreOS (which Azure supports), you are still running virtualized. 

    Moreover, I don't have to deal with VMs anymore because this is an improved architecture over old VM style.

    I don't know what this means, where is the architectural benefit?


    Now if I want to host my website in Azure, I'd just publish to Azure. I bet it will be MUCH easier without the Docker and Linux stuff in between and it probably performs much better.

    How are you publishing to Azure? Using Azure App Service? That certainly is an option, but Microsoft has already stated that the performance would be about the same between Windows and Linux.


    So, my question is what is the point of this video? 

    It's so show how our tools make it easy to create a virtual machine that can use Docker and publish ASP.NET 5 apps easily. Once you have a Docker-enabled virtual machine, you can host a number of other Docker containers like Nginx, Redis, MongoDB and others, even on the same virtual machine. Second, the VS Tools for Docker are designed to Dockerize ASP.NET apps, they work whether you are targeting an on-premise server, your laptop using Boot2Docker, or a virtual machine running in AWS, Digital Ocean, etc. 

  • User profile image
    HamedMosavi

    Thank you very much for replying Dan. I'm sorry that I haven't been accurate enough. Here's some more details of what I have in mind:

    If I want to implement Microservices with Azure best solution probably is "Azure Service Fabric". If I want to use Azure for my Asp.Net app, best solution is "Azure Web Apps". It is my understanding that Azure already does something somewhat similar to containers in that I can ask it to create X instances of my WebApp, for example. With these in mind, I was confused to understanding the benefit of adding the Docker layer in between. Now I know Docker has its uses.

    For instance containers help to get rid of the architecture of multiple-VMs-on-top-of-a-hypervisor by packing apps instead and running them on top of the their platform (like Docker deamon) which brings the benefit of performance and also allowing apps to have all their dependencies independent of dependencies of other apps!

    For this last benefit of Docker, however, Asp.Net5 added the feature of "Nuget everywhere" which means even .Net core framework will be part of the final package! BTW, using OWIN, even current Asp.Net apps can be hosted on servers other than IIS.

     

    This for me means that Asp.Net 5 + Azure Web Apps already provide all the benefits that Docker provides. Am I missing something here?

    I haven't watched the Docker overview. As soon as I can, I will watch it. Thank you and thank you again for your reply. :)

  • User profile image
    Dennis Evans

    Just a heads up, the release version of VS2015 is not compatible with the "Tools for Docker - Preview" extension (understandably), so if you're trying this out in the release version wondering where the Docker Publish Profile is, that's why. Hopefully the extension will get an update soon.

    Great series, BTW. Very informative and easy to understand.

Add Your 2 Cents