What Is the Point of Docker?
So I am reading about Docker because I have seen quite few articles about but never really investigated it till now. However, I don't get the point? It seems like the main benefit is it makes sure all your dependencies are contained in a single unit.
However, if that was a concern I could just statically compile my code and any dependencies in a single binary. If that's a concern why use shared libraries and introduce this additionally layer?
8 comments
[ 3.1 ms ] story [ 32.2 ms ] threadAnd these containers can run on a bare metal Linux box, so unlike VMs Docker removes abstractions and overhead.
Docker simplifies software development and deployment so you don’t need a lot of additional configuration tools for infrastructure as code.
Is it mainly used for existing applications? I am not sure what the benefits of isolation like this would be?
You can also just code in your sane default config and not have to worry about that.
Also let's say you're running two different applications, and they use conflicting versions of some library or binary (like python versions). Docker is like one step of virtualization above virtualenvs, but below virtual machines (since you're sharing the same kernel).
The benefits are subtle, but there's quite a few. For example, it allows for applications to easily move from one machine to another without complex deployments. This is exactly how kubernetes works - with containers. Otherwise you'd need something like puppet or ansible to do the installs before you move apps around, and clean up after themselves.
The other thing is cleaning things up - you just delete the container, you don't have to worry about uninstalling dependencies or cleaning up after yourself. You're just isolated. But the isolation is lighter than a virtual machine, allowing you to pack more containers than VMs on a host.
So containers are a way of packaging applications. The big deal about Docker is that it focuses on tooling the individual software developer experience rather than industrial scale sys-ops in data centers. Docker allows developers to test there software in stable environments, more easily. Containers don't get automatic upgrades. They don't vary between my laptop and your laptop. Or more commonly between my laptop today and my laptop tomorrow even though I ran `apt upgrade` (or more importantly, Windows installed updates since Docker even runs on Windows).
How is that problem? Unless I need it to work with an old version. I would want anything I write to work with the latest version of a library, os ect... If it breaks while I am writing it that means I am likely doing something wrong or found a bug in underlying dependency or system.
-edit- I do suppose people develop software with languages that can't be compiled. Although, I see GO developers mention docker.