0

Putting aside aws ECS and other container services for a moment, is a docker host running on top of a VM in the cloud irrelevant?

Containers are supposed to optimize out the guest OS, but since you're working with VM's already isn't it sort of a "hat-on-a-hat"?

What would the benefits of say, hosting 4 containers on two medium sized VM's as opposed to just 4 small VM's provisioned with packer?

ChrisW
  • 1

1 Answers1

0

There will be benefits.

For example, consider a case where some virtual machine hosts Docker with containerised apps. While similar setup can be achieved with thin VMs, this might be not as handy to do as with Docker. Also VMs are still not as thin as containers, wthey will waste more resources, because each one would run full-blown OS, each with its own kernel and full environment, opposed to a Docker setup, where only one OS kernel and one set of system services are running.

On the other hand, putting the Docker with its apps into dedicated VM isolates all this stuff from other services on the host and you then may run other VMs on that host which would'n even know there is Docker nearby. This improves manageability considerably. This also will enable you to implement "IaaS"-style high availability, because this Docker VM will be uncoupled from hardware and may be migrated to another host if needed. With careful setup, this would improve overall availability (in addition to "PaaS" which Docker implements itself).

In general virtualisation meant to solve one set of issues, while containerisation solves others. There is some overlap, in the field of full system containerisation, like Proxmox VE does. It runs dedicated environment with LXC for a container. But still, given PVE and a need to run Docker, I'll set up a VM for it, just to be sure it wouldn't interfere with cluster and so on.

Nikita Kipriyanov
  • 10,947
  • 2
  • 24
  • 45