Docker For Beginners — With a Python Example

<p>I&rsquo;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&rsquo;s not very clear for someone who knows nothing about containers.</p> <p>I now use it excessively, because I&rsquo;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.</p> <h2>What is Docker?</h2> <p>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.</p> <h2>What is the difference between a container and a VM?</h2> <p>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.</p> <p>But virtual machines are quite heavy and consume a lot of resources. That&rsquo;s why containers were developed: to enable isolation similar in part to virtual machines without consuming as many resources.</p> <p><a href="https://medium.com/@estebanthi/docker-for-beginners-with-a-python-example-583b590f4322"><strong>Click Here</strong></a></p>
Tags: Python Example