<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Container on Margrop Blog</title>
    <link>https://blog.margrop.net/en/tag/container/</link>
    <description>Recent content in Container on Margrop Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-US</language>
    <lastBuildDate>Sat, 13 Jun 2026 07:30:00 +0800</lastBuildDate>
    <atom:link href="https://blog.margrop.net/en/tag/container/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>The Docker Container Is Running, the Port Is Dead: A Complete Walkthrough of a Silent Host-Bind Failure</title>
      <link>https://blog.margrop.net/en/post/docker-port-bind-half-silent/</link>
      <pubDate>Sat, 13 Jun 2026 07:30:00 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/docker-port-bind-half-silent/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;docker ps&lt;/code&gt; says everything is fine. &lt;code&gt;docker inspect&lt;/code&gt;&amp;rsquo;s &lt;code&gt;HostConfig.PortBindings&lt;/code&gt; clearly says &lt;code&gt;203.0.113.14:3001:3000&lt;/code&gt;. But on the host, &lt;strong&gt;no &lt;code&gt;docker-proxy&lt;/code&gt; is listening&lt;/strong&gt;, the iptables &lt;code&gt;nat/DOCKER&lt;/code&gt; chain has &lt;strong&gt;no DNAT rule&lt;/strong&gt;, and &lt;code&gt;NetworkSettings.Networks&lt;/code&gt; and &lt;code&gt;Ports&lt;/code&gt; are both &lt;strong&gt;empty &lt;code&gt;{}&lt;/code&gt;&lt;/strong&gt;. This &amp;ldquo;container alive, port dead&amp;rdquo; state is what happens when libnetwork silently rolls back the endpoint creation because the target interface wasn&amp;rsquo;t up at attach time — and Docker doesn&amp;rsquo;t bother to tell you that the port publish never actually happened. &lt;strong&gt;The fix is a single 30-second command&lt;/strong&gt;: &lt;code&gt;docker network connect &amp;lt;net&amp;gt; &amp;lt;ctr&amp;gt;&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>Enable Automatic Startup for Docker Services and Containers After Reboot</title>
      <link>https://blog.margrop.net/en/post/reboot-docker-server-auto-start/</link>
      <pubDate>Tue, 06 Apr 2021 14:39:32 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/reboot-docker-server-auto-start/</guid>
      <description>&lt;p&gt;After rebooting the operating system, I found that the Docker service did not start and the containers did not start either. How do you make them start automatically after reboot?&lt;/p&gt;&#xA;&lt;h1 id=&#34;solve-two-problems&#34;&gt;Solve Two Problems&lt;/h1&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Enable automatic restart for the Docker service&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;systemctl enable docker.service&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img src=&#34;https://blog.margrop.net/post-images/external/cd1b1425e8c3d0f4.png&#34;&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
