2 ms·
The principal difference is that the virtual machine contains everything whereas you can spawn a container for all the components of your infrastructure. - It'
by realusername 12y ago
The principal difference is that the virtual machine contains everything whereas you can spawn a container for all the components of your infrastructure.
- It's easy to restart a container if it crashed and container can be tested individually before being pushed in production.
- An application will not mess with the configuration of another app (that's solving the problem of virtualenv, rvm and apt incompatibilities).
- The application is not tight to a physical machine, a container can connect to another machine instead of the local one just by changing the routing or environment variables if everything is done properly.
It's the UNIX philosophy applied to applications, everything must be as small as possible, do only one task and do it properly and I think that's part of docker's popularity.
However like most things, it's not really magic and it must be designed and maintained properly to get all these benefits.