Quote from: Erm on August 26, 2024, 11:47:03What are the specific advantages and disadvantages compared to say running in another kind of container or VM?
I wouldn't consider myself an expert, and don't work in DevOps, but do have plenty of experience using both docker containers and traditional VMs, and would point to two main advantages for docker:
1. Lower performance costs: there are exceptions to every rule, especially this one, but your average docker container spun up with a lightweight Linux and tasked with running one app only is in most cases going to require less resources than a full-fledged OS running in a VM.
2. Transferability: of course you can migrate VMs, I frequently do, both at work and at home, but with a docker container, preferably one built with a Dockerfile I wrote (or at least read and understood) myself on top of a stable well-known image, I can be 100% sure that if it runs on box A and box B can run docker, it will also run exactly the same on box B (allowing for slower/faster) - I effectively don't need to know anything else about box B and I don't have to worry about any other config issues (as long as I'm not relying on some specific local paths). With VMs, there's usually a lot more to double check to be sure that your disk image will boot somewhere else.
Of course all advantages are disadvantages in the right/wrong context: sometimes you want or need all the features of a full OS, and sometimes keeping everything containerised is too limiting and prevents you from being able to get the work done.
As this article shows, it's entirely possible to find solutions to the limitations of docker (and other container platforms) and even run full GUI OSes as containers - I'm not sure it's the best solution, and personally I'll probably carry on using containers for single function/app/group services, and VMs for terminal servers and bigger projects, but it's pretty cool that it's even possible to spin up an instance of a full GUI OS like Windows or macOS with a single short terminal command.