Docker containers create a separate, virtual environment for program or processes all running on the same server. They contain all of the information and dependencies for those programs inside the container itself. This can be advantageous for several reasons:
– If you are running multiple programs that use the same dependencies, you can ensure there are no conflicts (e.g. two programs require two different versions of the dependency
– If one container updates the dependency, you can be sure it doesn’t break other programs that use the same dependency.
– If there is a critical error in a container and it crashes, the host system will be unaffected.
– You can easily limit access to host files and resources
– You can spin down, make changes, and spin up containers without affecting other programs running on the server.
I’m sure there are other benefits, but that is what I can think of off the top of my head.
Many of these benefits are also available using virtual machines, but containers have the advantage of being far less resource intensive.
Latest Answers