I'm considering setting up a Samba server and I know I could run it in a VM or use Docker. Using a VM sounds simpler for just this single app, especially since it's only going to handle Samba. But I'm curious, what are the real advantages of using Docker over a direct installation? Also, I plan to use either Proxmox or ESXi as my hypervisor, but I'm not keen on running the Samba container on Proxmox itself. Would love to hear your thoughts!
5 Answers
If you're doing an entire VM setup just for Samba, the benefits of Docker might be lost. But if your usage is lightweight or experimental, Docker could be the way to go.
Another reason to consider Docker is that uninstalling is a breeze. If you directly install an app, it can leave behind all sorts of files and configs, making cleanup a hassle. When you remove a Docker container, it cleans up everything in one go, which is super convenient!
One of the big advantages of Docker is managing dependencies. It can run your app without worrying about what the OS has installed, avoiding conflicts over languages or libraries. Your Samba server can run in its own environment that's perfectly suited for it.
It really depends on your needs. If you're using Samba primarily for Active Directory, I'd lean toward Docker for its simplicity. But if you're thinking of it mainly for file sharing, a full VM could provide more features you might need down the line.
Docker acts like a lightweight VM focused on running a single app without wasting resources. When you run a traditional VM, you have overhead that isn't necessary for just one application, like Samba. Plus, Docker lets you easily manage updates and rollbacks, so if something goes wrong, you simply restart the container instead of worrying about a potentially corrupted installation.

That's a good point about resource management. With a direct VM, you have to regularly maintain it, but Docker can streamline the process more for apps like Samba.