<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Docker on mahroot's blog</title><link>https://mahroot.dev/tags/docker/</link><description>Recent content in Docker on mahroot's blog</description><generator>Hugo</generator><language>en-us</language><copyright>&lt;a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener"&gt;CC BY-NC 4.0&lt;/a&gt;</copyright><lastBuildDate>Fri, 06 Mar 2026 00:00:47 +0100</lastBuildDate><atom:link href="https://mahroot.dev/tags/docker/index.xml" rel="self" type="application/rss+xml"/><item><title>Containerd under the hood</title><link>https://mahroot.dev/posts/containerd-under-the-hood/</link><pubDate>Fri, 06 Mar 2026 00:00:47 +0100</pubDate><guid>https://mahroot.dev/posts/containerd-under-the-hood/</guid><description>&lt;h1 id="phase-1-runc-raw--zero-tooling"&gt;Phase 1: runc Raw — Zero Tooling&lt;/h1&gt;
&lt;p&gt;so what we&amp;rsquo;ll do in this phase is exactly what containerd does internally&lt;/p&gt;
&lt;p&gt;me (manually) vs containerd (automatically) ─────────────────────────────────────────────────────────&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create rootfs → pulls image layers&lt;/li&gt;
&lt;li&gt;Write config.json → generates OCI bundle&lt;/li&gt;
&lt;li&gt;Call runc run → calls runc via shim&lt;/li&gt;
&lt;li&gt;Watch cgroups appear → same thing happens&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;first i installed containerd
&lt;img src="https://mahroot.dev/images/Pasted%20image%2020260305002032.png" alt="Pasted image 20260305002032"&gt;
so it&amp;rsquo;s automatically we can see that we have runc but not crun, (so the default OCI implementation in containerd is runc)&lt;/p&gt;</description></item><item><title>containerd vs OCI, and the k8s architecture</title><link>https://mahroot.dev/ilt/2026/03/04/04-03-26/</link><pubDate>Wed, 04 Mar 2026 00:00:00 +0000</pubDate><guid>https://mahroot.dev/ilt/2026/03/04/04-03-26/</guid><description>&lt;h1 id="what-is-the-different-between-containerd-and-oci-open-container-initiative"&gt;what is the different between containerd and OCI (open container initiative)&lt;/h1&gt;
&lt;p&gt;writing &amp;hellip;&lt;/p&gt;
&lt;h1 id="k8s-architecture"&gt;k8s architecture&lt;/h1&gt;
&lt;p&gt;&lt;img src="https://mahroot.dev/images/Pasted%20image%2020260304201507.png" alt="Pasted image 20260304201507"&gt;&lt;/p&gt;
&lt;p&gt;thanks @djalal for explications &amp;lt;3
writing &amp;hellip;&lt;/p&gt;</description></item><item><title>Docker runtime stack, build cache and volumes</title><link>https://mahroot.dev/ilt/2026/03/03/03-03-2026/</link><pubDate>Tue, 03 Mar 2026 23:52:59 +0100</pubDate><guid>https://mahroot.dev/ilt/2026/03/03/03-03-2026/</guid><description>&lt;h1 id="docker-runtime-stack"&gt;Docker runtime stack&lt;/h1&gt;
&lt;p&gt;&lt;img src="https://mahroot.dev/images/Pasted%20image%2020260303123027.png" alt="Pasted image 20260303123027"&gt;&lt;/p&gt;
&lt;h3 id="1--docker-cli"&gt;1- docker cli&lt;/h3&gt;
&lt;p&gt;translate commands to rest api and send it over unix socket&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;docker run ngnix &lt;span style="color:#f92672"&gt;===&lt;/span&gt;&amp;gt; POST /container/create &lt;span style="color:#f92672"&gt;{&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;Image&amp;#34;&lt;/span&gt;:&lt;span style="color:#e6db74"&gt;&amp;#34;nginx:latest&amp;#34;&lt;/span&gt;, ....&lt;span style="color:#f92672"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;===&lt;/span&gt;&amp;gt; sent to: /var/run/docker.sock
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;so we can talk to dockerd with it&lt;/p&gt;
&lt;p&gt;like&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;curl --unix-socket /var/run/docker.sock http://localhost/containers/json
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="2--dockerd"&gt;2- dockerd&lt;/h3&gt;
&lt;p&gt;it&amp;rsquo;s an orchestrator&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;manage images (pull, build)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;manage volume (create net, mount)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;manage network (bridge creation, port mapping)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;docker run delegated to containerd not here&lt;/strong&gt; !!&lt;/p&gt;</description></item><item><title>Container Filesystem</title><link>https://mahroot.dev/posts/container-filesystem/</link><pubDate>Sun, 08 Feb 2026 23:56:04 +0100</pubDate><guid>https://mahroot.dev/posts/container-filesystem/</guid><description>&lt;p&gt;&lt;img src="https://mahroot.dev/images/Pasted%20image%2020260209000710.png" alt="Pasted image 20260209000710"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://mahroot.dev/images/Pasted%20image%2020260209000844.png" alt="Pasted image 20260209000844"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://mahroot.dev/images/Pasted%20image%2020260209001058.png" alt="Pasted image 20260209001058"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://mahroot.dev/images/Pasted%20image%2020260209001254.png" alt="Pasted image 20260209001254"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://mahroot.dev/images/Pasted%20image%2020260209001457.png" alt="Pasted image 20260209001457"&gt;&lt;/p&gt;</description></item><item><title>Fixing Flyway Database Connection Errors in Docker</title><link>https://mahroot.dev/posts/fixing-flyway-database-connection-errors-in-docker/</link><pubDate>Thu, 20 Nov 2025 12:19:05 +0100</pubDate><guid>https://mahroot.dev/posts/fixing-flyway-database-connection-errors-in-docker/</guid><description>&lt;p&gt;Before reading this blog i suggest you have a quick look at how &lt;em&gt;Docker Compose starts services&lt;/em&gt; especially how databases take time to initialize before they start accepting connections.&lt;/p&gt;
&lt;p&gt;so basically, when you work with microservices, each service has its own database (in my case: patient-db, doctor-db…). and when Spring Boot starts, Flyway tries to run the migration scripts immediately.&lt;/p&gt;
&lt;p&gt;But there is a problem:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Flyway is much faster than PostgreSQL.&lt;/em&gt;&lt;br&gt;
PostgreSQL says: “I’m starting…”&lt;br&gt;
Flyway says: “I want to connect now.”&lt;br&gt;
PostgreSQL says: “Wait wait wait hold on…”&lt;br&gt;
Flyway says: “Connection refused.”&lt;/p&gt;</description></item></channel></rss>