0

If I have Docker (or some other container software) running on Debian or other distro, does that mean I can run ASP.NET MVC, C#, etc. in that container? When I say "run on Linux," I know it doesn't mean run natively, only in the Docker container.

Does Docker provide all that is needed, or have it for me to get to put into the container?

Isn't this what a container is for?

EDIT: I don't mean as a hack or the like. I'm asking isn't this the intention of containers, a normal practice.

EDIT: I think I understand based upon tobyd's answer. I believe I was thinking too "VMish." All the talks I see about Docker show "HostOS" and then Docker on top of it and then the containers. There were assumptions by the presenter that there were not woefully uninformed people such as myself.

But What I never heard was that means you can't run just anything in those containers. The way presentations made it sound was if Docker could get the infrastructure to run anything without actually being a full image OS image (like a VM). I did read how they use the same kernel, but I never put it together. It was magic. I also see why we need a Windows implementation of Docker, though I am not sure why they need Hyper-V (but, I digress).

  • The Windows one needs Hyper-V as it runs one variant of Windows containers as a container in an optimised VM. Incidentally, Docker on Windows (from their packaged msi) currently uses Hyper-V to run a Docker host on a linux VM too (it might also work with other hypervisors). Agreed - there is a lot of info out there on Docker and its not all on the same page :s – tobyd Dec 1 '16 at 17:06
  • @tobyd Thanks for your help. Do I understand the essential of the concept you think based on my edit? – johnny Dec 1 '16 at 17:07
  • 1
    I think there is some confusion when containers get likened to VMs where you can easily mix and match platforms - Ubuntu guest on Hyper-V, Windows on KVM and so on. Containers rid you of the overhead of having to run entire operating systems within each VM at the cost of restricting you to what will run on the Docker hosts underlying Kernel. Its more complex than that but i think 'lightweight VMs' is very misleading. You sound like you are on the right track though. – tobyd Dec 1 '16 at 17:33
2

You could run the newer .net core stuff in a container or if your asp.net stuff will run on Mono but Docker doesn't let you just run code you'd drop straight into IIS on a Windows machine on linux just by merit of being a container. Docker is still using the underlying Linux kernel of the host and doesn't provide a magic cross-platform bridge. There are containers for windows in Server 2016 and Windows 10 (IIRC) for windows specific stuff.

| improve this answer | |
  • Thanks. I am back to more reading. I don't get it yet. – johnny Dec 1 '16 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.