<?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: Mentor Gashi</title>
    <description>The latest articles on DEV Community by Mentor Gashi (@simultsop).</description>
    <link>https://dev.to/simultsop</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%2F502370%2F1faf7c12-e3ea-4b1a-b158-3363cf851d2f.jpg</url>
      <title>DEV Community: Mentor Gashi</title>
      <link>https://dev.to/simultsop</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/simultsop"/>
    <language>en</language>
    <item>
      <title>Just a little Docker should not give you harm, right?</title>
      <dc:creator>Mentor Gashi</dc:creator>
      <pubDate>Wed, 16 Jun 2021 09:01:48 +0000</pubDate>
      <link>https://dev.to/simultsop/just-a-little-docker-should-not-give-you-harm-right-199o</link>
      <guid>https://dev.to/simultsop/just-a-little-docker-should-not-give-you-harm-right-199o</guid>
      <description>&lt;p&gt;Struggling around to get through your first day with &lt;a href="https://docker.com/"&gt;Docker&lt;/a&gt;? It really kinda is frustrating. Add a few more tools that you just met and that's how you start burning out. To cool it down a bit, I will list a few hints I wish someone gave me when embarking a Full-Stack role including some minor DevOps tasks that keeps you going.&lt;/p&gt;

&lt;p&gt;TL;DR &lt;/p&gt;

&lt;p&gt;Docker plays the role similar to node and &lt;a href="https://docs.npmjs.com/about-npm"&gt;npm&lt;/a&gt; combined. Instead of code libraries, it makes flexible management of servers that are going to run the code that you will be developing throughout your career, potentially. You can browse documentation of run commands &lt;a href="https://docs.docker.com/engine/reference/run/"&gt;here&lt;/a&gt;. It brings server virtualization to a whole new level.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LF7DuWyK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxqgnhwmaed9ndkjtjt0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LF7DuWyK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxqgnhwmaed9ndkjtjt0.jpg" alt="Docker Hub traffic"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Talking about analogies let me do the same to &lt;a href="https://docs.docker.com/engine/reference/builder/"&gt;Dockerfile&lt;/a&gt;. Similar to what &lt;strong&gt;package.json&lt;/strong&gt;'s role is, the Dockerfile also tells dependencies-like of your server with additional functionalities. Instead of solely telling what kind of dependencies you need it can also perform additional Linux commands, copy/move files, run scripts.&lt;/p&gt;

&lt;p&gt;Since you now know a bit what Docker does, lets break down other keywords which make up a delicious lasagna when we first hear about them. Keywords list goes like,  hub, images, containers, clusters, compose and so on. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hub&lt;/strong&gt; is the registry where people publish their images. An entire directory which becomes available by default on your terminal. So whenever you would try to run a server, for example &lt;code&gt;docker run node&lt;/code&gt; it will grab a public image which uses node as its name: &lt;a href="https://hub.docker.com/_/node"&gt;https://hub.docker.com/_/node&lt;/a&gt; (you can also host your own private registry).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Images&lt;/strong&gt; are the entire definition of the container/vps starting from its OS to any kind of services it tells the to run, at which port and/or which port it should be  exposed. Once you run a server from an image, that specific image will be saved/cached on the host or your own machine for further use/or same server recreation. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Containers&lt;/strong&gt;, since we reached this section I will make the final analogy. Considering the others above we will keep comparing it with Javascript eco-system. Given the convenience of reusing the logic of a large codebase, developers split repeated logics and port them as npm packages. Same approach is now possible with Docker, providing Linux services or backend operations in isolated environments serving a huge app's backend. Besides the security benefits it brings on server management it also makes use of its resources more efficiently by load balancing them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clusters&lt;/strong&gt; as the name suggests it is a group of some resources. In Docker it is a logical set of containers. Based on how they're designed, for example they can communicate internally without applying any security measures, reverse proxying specific containers services to the public e.g. HTTP (80) and HTTPS (443).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Compose&lt;/strong&gt; is the engine which constructs a container or multiple in an automated fashion. It can be extended using additional configuration management software named &lt;a href="https://en.wikipedia.org/wiki/Ansible_(software)"&gt;Ansible&lt;/a&gt;. Docker-compose turns infrastructure-as-a-code to a sane job.&lt;/p&gt;

&lt;p&gt;Now you have a better picture of what is going on the Docker end you can get back to your code and do the best you can 🚀&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--swPkfXL---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3w479md2j75dvwwy5mz8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--swPkfXL---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3w479md2j75dvwwy5mz8.jpg" alt="Back to work"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>beginners</category>
      <category>fullstack</category>
    </item>
  </channel>
</rss>
