<?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: Lotanna</title>
    <description>The latest articles on DEV Community by Lotanna (@tannababy).</description>
    <link>https://dev.to/tannababy</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%2F3602646%2Fd3d0fc6a-57eb-4b3f-aa43-7996cc6a6b12.jpeg</url>
      <title>DEV Community: Lotanna</title>
      <link>https://dev.to/tannababy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tannababy"/>
    <language>en</language>
    <item>
      <title>🗓️ Docker Learning Journal</title>
      <dc:creator>Lotanna</dc:creator>
      <pubDate>Mon, 10 Nov 2025 21:33:58 +0000</pubDate>
      <link>https://dev.to/tannababy/docker-learning-journal-37ka</link>
      <guid>https://dev.to/tannababy/docker-learning-journal-37ka</guid>
      <description>&lt;h2&gt;
  
  
  🧠 Week 1 Overview
&lt;/h2&gt;

&lt;p&gt;Last week, I built a solid foundation in Docker. I got to understand containers and images, explore networks and persistent storage.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧩 Key Concepts Covered
&lt;/h3&gt;

&lt;h4&gt;
  
  
  🐳 1. Docker Basics
&lt;/h4&gt;

&lt;p&gt;I installed Docker for Mac and learned about the difference between images and containers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Images:&lt;/strong&gt; Templates used to create containers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Containers:&lt;/strong&gt; Running instances of images. They are isolated environments that include an app and all its dependencies.&lt;/p&gt;

&lt;p&gt;💡 I learnt the hard way that on Mac and Windows, Docker Desktop must be running for Docker commands, or managing resources to work. Docker Desktop provides the background service (Docker Engine) that powers the CLI.&lt;/p&gt;

&lt;h4&gt;
  
  
  🔧 2. Core Commands
&lt;/h4&gt;

&lt;p&gt;The table below contains some of the essential Docker commands I learnt to manage containers and images:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docker ps&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Lists running containers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docker ps -a&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Lists all containers(running and stopped)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docker images&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Lists available images&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docker start &amp;lt;container&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Starts a stopped container&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docker attach &amp;lt;container&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Attaches to a running container&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docker stop &amp;lt;container&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Stops one or more containers&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  🏗️ 3. Building and Running Images
&lt;/h4&gt;

&lt;p&gt;I learned to create images using Dockerfiles, with key instructions like:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FROM&lt;/strong&gt; → sets the base image&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;COPY&lt;/strong&gt; → copies files from the host into the image&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RUN&lt;/strong&gt; → executes commands during the image build process (e.g., installing dependencies or packages)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CMD&lt;/strong&gt; → defines the command to run when the container starts&lt;/p&gt;

&lt;p&gt;I explored how &lt;code&gt;docker build&lt;/code&gt; works and how to tag images.&lt;br&gt;
I also used &lt;code&gt;docker run&lt;/code&gt; to create containers from images, and the &lt;code&gt;-d&lt;/code&gt; flag to run them in detached mode.&lt;/p&gt;

&lt;p&gt;Additionally, I learned more about tags. Docker uses tags to identify different versions of the same image.&lt;br&gt;
If I want to replace or create a new tag, I can use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker tag image1:latest image1:version1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This lets me manage image versions more clearly, making it easier to track updates or maintain stable releases.&lt;/p&gt;

&lt;p&gt;I also learned how to push custom images to Docker Hub.&lt;br&gt;
To do this, I first log in using:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Then, I had to tag my image correctly with my Docker Hub username before pushing, because Docker would deny the request. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker tag image1:version1 tannababy/image1:version1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, I could push the image to Docker Hub:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker push tannababy/image1:version1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If no tag is specified, Docker automatically assigns the default tag latest to the most recently built image.&lt;/p&gt;

&lt;h4&gt;
  
  
  🧱 4. Creating Images from Containers
&lt;/h4&gt;

&lt;p&gt;I discovered that you can also create images from existing containers using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker commit &amp;lt;container-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;--change&lt;/code&gt; flag allows modifying commands that the new image executes first.&lt;/p&gt;

&lt;h4&gt;
  
  
  🌐 5. Networking
&lt;/h4&gt;

&lt;p&gt;I learned that &lt;code&gt;docker network&lt;/code&gt; is used for managing container communication. By default, containers run in a &lt;strong&gt;bridge network.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Commands explored:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ip addr show&lt;/code&gt; → displays network interfaces&lt;br&gt;
&lt;code&gt;arp-scan --interface=eth0 --localnet&lt;/code&gt; → shows all containers on the network&lt;br&gt;
&lt;code&gt;ping &amp;lt;IP&amp;gt;&lt;/code&gt; → tests connectivity&lt;br&gt;
&lt;code&gt;curl&lt;/code&gt; → interacts with web apps or APIs&lt;/p&gt;

&lt;p&gt;The three main network types are:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;bridge&lt;/td&gt;
&lt;td&gt;Default; containers communicate via internal bridge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;host&lt;/td&gt;
&lt;td&gt;Shares the host network, no isolation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;No network access&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Other concepts learned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Detach from containers using &lt;code&gt;Ctrl + P&lt;/code&gt;, then &lt;code&gt;Ctrl + Q&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bind container ports to host ports using &lt;code&gt;-P&lt;/code&gt; tag&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Specify container networks using &lt;code&gt;--network &amp;lt;network-name&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  💾 6. Persistent Storage
&lt;/h4&gt;

&lt;p&gt;Docker handles data persistence using 3 storage types:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bind Mounts:&lt;/strong&gt; link host directories to containers &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They are good for development. Changes made on the host are instantly reflected inside the container without needing to rebuild the image.&lt;/li&gt;
&lt;li&gt;You must know the exact path on the host.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Volumes:&lt;/strong&gt; managed by Docker, ideal for production and sharing data between containers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker decides where the data lives, so you don’t need to specify host paths.&lt;/li&gt;
&lt;li&gt;Supports external storage and different drivers (more on that later).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;tmpfs:&lt;/strong&gt; in-memory temporary storage in RAM, useful for sensitive or short-lived data that shouldn’t persist on disk.&lt;/p&gt;

&lt;p&gt;To attach storage to a container, I learned about the &lt;code&gt;--mount&lt;/code&gt; flag, which provides a consistent way to define different storage types:&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 &lt;span class="nt"&gt;--mount&lt;/span&gt; &lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;bind&lt;/span&gt;,source&lt;span class="o"&gt;=&lt;/span&gt;/path/on/host,target&lt;span class="o"&gt;=&lt;/span&gt;/path/in/container &amp;lt;image-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;type=&lt;/code&gt; specifies the storage type (&lt;code&gt;bind&lt;/code&gt;, &lt;code&gt;volume&lt;/code&gt;, or &lt;code&gt;tmpfs&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;source=&lt;/code&gt; defines the host directory or volume name (not needed for tmpfs)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;target=&lt;/code&gt; defines the directory path inside the container&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This syntax made it clearer how Docker connects external data to running containers and how flexible storage setups can be depending on the use case.&lt;/p&gt;

&lt;p&gt;⚙️ Skills Progressed&lt;/p&gt;

&lt;p&gt;By the end of Week 1, I’ve learned to:&lt;br&gt;
✅ Understand Docker’s architecture and use cases.&lt;br&gt;
✅ Build and run images using Dockerfiles.&lt;br&gt;
✅ Manage container lifecycle (start, stop, inspect, delete).&lt;br&gt;
✅ Use networking features to connect containers.&lt;br&gt;
✅ Set up persistent storage strategies.&lt;/p&gt;

&lt;p&gt;A key takeaway this week was understanding that Docker helps ensure applications run consistently across different environments.&lt;/p&gt;

&lt;p&gt;I can now recognise why Dockerfiles are preferred, they make images version-controlled, shareable, and automatable.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>docker</category>
      <category>devjournal</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
