<?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: Meshack Mulei</title>
    <description>The latest articles on DEV Community by Meshack Mulei (@meshackmulei).</description>
    <link>https://dev.to/meshackmulei</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4270276%2F53c010cc-7558-463b-b350-1dc2a1ca0a6e.jpg</url>
      <title>DEV Community: Meshack Mulei</title>
      <link>https://dev.to/meshackmulei</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/meshackmulei"/>
    <language>en</language>
    <item>
      <title>Saying Hello to My First Container</title>
      <dc:creator>Meshack Mulei</dc:creator>
      <pubDate>Sat, 28 Nov 2026 09:22:11 +0000</pubDate>
      <link>https://dev.to/meshackmulei/saying-hello-to-my-first-container-2gp</link>
      <guid>https://dev.to/meshackmulei/saying-hello-to-my-first-container-2gp</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Today I set up Docker from scratch on my Linux machine, ran my first containers, explored how Docker tracks images and containers under the hood, and cleaned up my environment afterward. Here is what I learned along the way.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Docker Explained Simply
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What is Docker?&lt;/strong&gt;
&lt;em&gt;A tool that packages an app and everything it needs to run into one neat, portable box.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What problem does Docker solve?&lt;/strong&gt;
&lt;em&gt;It solves the problem of apps breaking when you move them to a teammate's computer or a production server. Docker packages your app and all required tools (dependencies) into one portable bundle (called an image), so it runs the same everywhere.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What is the difference between an Image and a Container?&lt;/strong&gt;
&lt;em&gt;An Image is the read-only blueprint/recipe, while a Container is the live, running instance created from that image.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why is Docker called "containerization" and not virtualization?&lt;/strong&gt;
&lt;em&gt;Containers share the host computer's OS kernel(the core engine of the operating system) instead of booting up a heavy, full guest operating system as a Virtual Machine does. &lt;strong&gt;Containerization&lt;/strong&gt; (Docker) is like an apartment building: all the apartments share the building's main foundation and plumbing (in tech terms, the host computer's OS kernel). &lt;strong&gt;Virtualization&lt;/strong&gt; (using Virtual Machines) is like building a separate house for every app. Each house needs its own plumbing, electricity, and foundation; this means every Virtual Machine has to boot up its own heavy, full operating system (like Windows or Linux). That takes up a lot of memory and starts up slowly.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Where are Docker images stored before reaching your computer?&lt;/strong&gt;
&lt;em&gt;They live in remote cloud registries (most commonly Docker Hub) until you pull them down.&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Installing Docker &amp;amp; Checking Its Health
&lt;/h2&gt;

&lt;p&gt;I followed Docker's official Linux installation guide to get the engine running on my system. To confirm Docker was installed and healthy, I checked the version and service status:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker --version
sudo systemctl status docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsihf82zwfd33ne3d0hh9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsihf82zwfd33ne3d0hh9.png" alt="Installing Docker &amp;amp; Checking Its Health" width="799" height="286"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Running My First Containers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Hello World
&lt;/h3&gt;

&lt;p&gt;Next, I ran the classic test container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run hello-world
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Did Docker already have the image?&lt;/strong&gt; Docker checked locally first, didn't find &lt;code&gt;hello-world&lt;/code&gt;, automatically pulled it from Docker Hub, and then ran it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fymqyjuskwnlt3rhq8ooe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fymqyjuskwnlt3rhq8ooe.png" alt="Hello World" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Interactive Ubuntu Shell
&lt;/h3&gt;

&lt;p&gt;Then I ran an interactive Ubuntu container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run -it ubuntu bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What happened?&lt;/strong&gt; Docker checked locally first, didn't find &lt;code&gt;ubuntu&lt;/code&gt;, automatically pulled it from Docker Hub, and then ran it. I was dropped straight into a bash terminal &lt;em&gt;inside&lt;/em&gt; the isolated Ubuntu container, and typing &lt;code&gt;exit&lt;/code&gt; stopped the container and brought me back to my host Linux prompt.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3y3xot6lhv4h2fvfyl2m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3y3xot6lhv4h2fvfyl2m.png" alt="Interactive Ubuntu Shell" width="800" height="174"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Investigating My Environment
&lt;/h2&gt;

&lt;p&gt;Before deleting anything, I inspected what was sitting on my machine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Images on my machine:&lt;/strong&gt; &lt;code&gt;docker images&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Currently running containers:&lt;/strong&gt; &lt;code&gt;docker ps&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;All containers (including stopped ones):&lt;/strong&gt; &lt;code&gt;docker ps -a&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs0bxryec8vtqrrdyv36q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs0bxryec8vtqrrdyv36q.png" alt="Investigating My Environment" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Leaving No Zombies (Cleanup)
&lt;/h2&gt;

&lt;p&gt;Since stopped containers and unused images still take up disk space, I cleaned everything up:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Remove the stopped containers&lt;/span&gt;
docker rm 879af2055c38 b991d7810fa9

&lt;span class="c"&gt;# Remove the downloaded images&lt;/span&gt;
docker rmi hello-world ubuntu
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, I ran &lt;code&gt;docker ps -a&lt;/code&gt; and &lt;code&gt;docker images&lt;/code&gt; one last time to verify my environment was completely clean.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6d6i17lxw717gw8ai681.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6d6i17lxw717gw8ai681.png" alt="Cleanup" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>devops</category>
      <category>linux</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
