<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Miguel Varona</title>
    <description>The latest articles on DEV Community by Miguel Varona (@mavarnare).</description>
    <link>https://dev.to/mavarnare</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F139252%2F3e9b121e-5c2d-4ced-b727-963b75a4d9cb.png</url>
      <title>DEV Community: Miguel Varona</title>
      <link>https://dev.to/mavarnare</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mavarnare"/>
    <language>en</language>
    <item>
      <title>Weigh anchor! What is Docker?</title>
      <dc:creator>Miguel Varona</dc:creator>
      <pubDate>Sun, 19 Dec 2021 22:16:38 +0000</pubDate>
      <link>https://dev.to/mavarnare/weigh-anchor-what-is-docker-3i6i</link>
      <guid>https://dev.to/mavarnare/weigh-anchor-what-is-docker-3i6i</guid>
      <description>&lt;p&gt;I recently started a journey to unveil the mysteries of Docker. Nowadays Docker has become something you have most likely heard at least once but...what is it?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker is a tool that allows you to create isolated containers to run and share your applications.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why? My code works perfectly fine in my computer!
&lt;/h3&gt;

&lt;p&gt;It sure does! However, production is not going to be run on your computer.&lt;/p&gt;

&lt;p&gt;Imagine you are going to deploy your awesome application or share it with a colleage. You start setting things and then you get some random error. &lt;em&gt;"Weird. It worked on my computer"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Now you have to play detective to see what's wrong. Is it a mismatch in the packages' version? Is it some ENV variable with a typo? That's not fun at all!&lt;/p&gt;

&lt;p&gt;Docker allows you to put all of these steps into an image that will be used to create isolated and standarized containers.&lt;/p&gt;

&lt;h3&gt;
  
  
  An image?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;An image is a read-only file that tells Docker how to get your app up and running.&lt;/strong&gt; You can send this file and Docker will know just what to do. No matter whose computer it is.&lt;/p&gt;

&lt;h3&gt;
  
  
  Oh, ok...but what about containers?
&lt;/h3&gt;

&lt;p&gt;When you ask Docker to use your image and run your app it creates a container. &lt;strong&gt;Containers are a lightweight, standalone execution environment which actually runs your app isolated from other containers.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  So...is it like a virtual machine?
&lt;/h3&gt;

&lt;p&gt;It's similar but they don't work in the same way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A virtual machine has it's own OS&lt;/strong&gt; running on top of the host's OS while &lt;strong&gt;a container uses it's host's OS kernel&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That's why &lt;strong&gt;containers are a lot less demanding in terms of resources than using VMs&lt;/strong&gt;. However, this comes &lt;strong&gt;with the tradeoff of being less secure in terms of malicious attacks than virtualization&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Something else to have in mind is that since containers use the host system's kernel they won't be able to run directly on a different OS...&lt;/p&gt;

&lt;h3&gt;
  
  
  What?! But then I can only share my images with others using the same operating system as me!
&lt;/h3&gt;

&lt;p&gt;No need to worry! Docker has it covered. If you are not using Linux as your host OS, Docker will usually use a Linux VM (WSL) to run every container allowing your containers to be available for use in other OSs.&lt;/p&gt;

&lt;h3&gt;
  
  
  So it actually uses a VM! How is it any better than just using VM then?
&lt;/h3&gt;

&lt;p&gt;It's just a lightweight virtual machine whose OS kernel will be shared by all your containers instead of having one per container, so in the end it's still requires a lot less resources than using a VM approach and allows standarization of the images accross users with different OSs.&lt;/p&gt;

&lt;p&gt;We have now covered some of the most basic concepts on Docker and why you should use it.&lt;/p&gt;

&lt;p&gt;Thanks for reading this post. I hope it helped you get the grasp of some basic Docker concepts.&lt;/p&gt;

</description>
      <category>learning</category>
      <category>docker</category>
      <category>devops</category>
      <category>containers</category>
    </item>
  </channel>
</rss>
