Docker For Beginners — With a Python Example
I’ve only been using Docker for a short time, simply because I had trouble understanding what it was and what it could be used for. Indeed, even after reading various articles and the Docker documentation, I find that it’s not very clear for someone who knows nothing about containers.
I now use it excessively, because I’ve developed my own homelab and it makes it very easy to deploy applications on it. So I feel I can explain, in simple words, what Docker is, and how you can use it.
What is Docker?
In a nutshell, Docker is a tool that lets you deploy your applications in what are known as containers, i.e. isolated environments on a host machine. Containers allow you to isolate all the dependencies of an application and run it without generating conflicts with your system.
What is the difference between a container and a VM?
You may know what a VM (Virtual Machine) is. VMs enable you to run applications in a guest OS hosted on another machine. For example, if I want to use Windows on my Linux computer, I can create a Windows virtual machine that will allow me to use Windows in my virtual machine stored on my Linux computer.