Docker is a container system for software. It's focus is in making the deployment of software easier and more manageable.
For example shipping containers made the transportation of all sorts of goods much easier to move and handle, loading times were decreased and you don't have to spend time packing awkward things any more!
Docker does this for software, it puts it all in a neat container that has everything you need. So next time you go to install Discourse (a nifty little flat-forum I recently installed on another site!) or something similar, see if there's a docker container for it.
You won't need to worry about finding a specific flavour of the software or installing all it's dependencies and the like, because it's all in our Docker container!
The advantages of using Docker
Using Docker containers gives us a number of advantages, such as:
- Content and hardware agnostic
- Content isolation and interaction
- More efficient than VMs
- Separation of duties
Docker images are constructed from layered filesystems so they can share common files, making disk usage and image downloads much more efficient. Docker containers running on a single machine all share the same operating system kernel, so they start very quickly and make much more efficient use of the system RAM.
Because Docker containers are based on open standards, this means that they can run on all major Linux distros as well as Microsoft operating systems without issues.
These containers also serve as an added layer of abstraction, separating applications from each other and the underlying system infrastructure.
Why choose Docker over a Virtual Machine(VM)?
Docker containers have similar resource isolation and allocation as VMs, but a very different architectural approach.
A virtual machine has more individual "moving parts" than a docker container. Every VM contains the application, necessary binaries and libraries along with an operating system.
A Docker container includes the application and it's dependencies, but share's it OS kernel with other containers. This reduces the overhead while maintaining isolation between containers. Because these containers aren't tied to any specific infrastructure, they can run on any computer, any infrastructure and in any cloud.
I hope you enjoyed the read, I've recently started using Docker as I've been doing more and more web server stuff. I'll be back again soon, this time with a tutorial on installing Discourse.
Check out Docker's twitter account here.