<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Podman on Kenno&#39;s Open Note</title>
    <link>https://blog.khmersite.net/tags/podman/</link>
    <description>Recent content in Podman on Kenno&#39;s Open Note</description>
    <image>
      <title>Kenno&#39;s Open Note</title>
      <url>https://blog.khmersite.net/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://blog.khmersite.net/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.154.0</generator>
    <language>en</language>
    <lastBuildDate>Sun, 14 Dec 2025 22:39:33 +1100</lastBuildDate>
    <atom:link href="https://blog.khmersite.net/tags/podman/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Podman Quadlet Volume Ownership</title>
      <link>https://blog.khmersite.net/p/podman-quadlet-volume-ownership/</link>
      <pubDate>Sun, 14 Dec 2025 22:39:33 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/podman-quadlet-volume-ownership/</guid>
      <description>&lt;p&gt;This is a short note that serves as a self-reminder on how podman can automatically change the ownership of a source volume to match the default UID and GID within the container.&lt;/p&gt;
&lt;p&gt;TL;DR: Use the &lt;code&gt;:U&lt;/code&gt; suffix on the volume definition.&lt;/p&gt;
&lt;p&gt;The following is an example of the issue I had and how to apply the fix.&lt;/p&gt;
&lt;p&gt;First, let&amp;rsquo;s list the current ownership of the directory to be used as the source volume for the container.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Communicate from a rootless container to the host</title>
      <link>https://blog.khmersite.net/p/communicate-from-a-rootless-container-to-the-host/</link>
      <pubDate>Sun, 28 Sep 2025 16:49:13 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/communicate-from-a-rootless-container-to-the-host/</guid>
      <description>&lt;p&gt;Occasionally, I need to communicate from a podman container to its host, and I keep forgetting how to that. I know I can always google it, but from what had happened earlier today, having a short note to remind myself how this can be easily done is much preferable in my opinion.&lt;/p&gt;
&lt;p&gt;To communicate between the container and its host, we can just simply use &lt;code&gt;host.containers.internal&lt;/code&gt; or &lt;code&gt;host.docker.internal&lt;/code&gt; to refer to the host.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Running container with Podman Quadlet</title>
      <link>https://blog.khmersite.net/p/running-container-with-podman-quadlet/</link>
      <pubDate>Tue, 17 Dec 2024 11:06:41 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/running-container-with-podman-quadlet/</guid>
      <description>&lt;p&gt;Up until recently, my preferred method of creating Podman containers is to use Ansible, and that has been working fine for me. However, I just stumble the new-to-me method called &amp;ldquo;quadlet&amp;rdquo;. So far, I really like it, and already started moving some containers to quadlet.&lt;/p&gt;
&lt;p&gt;To learn more about Quadlet, check out [1]. But, today I&amp;rsquo;m going to share an example of creating a simple container with Quadlet.&lt;/p&gt;
&lt;p&gt;In this example, the container &lt;code&gt;whoami&lt;/code&gt; is run in rootless mode, under a non-privileged user.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Accessing host from inside Podman 5.0 container</title>
      <link>https://blog.khmersite.net/p/accessing-host-from-inside-podman-container/</link>
      <pubDate>Mon, 02 Dec 2024 20:47:20 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/accessing-host-from-inside-podman-container/</guid>
      <description>&lt;p&gt;Sometimes you need to connect to the host from a Podman container running on it. How would you do that?&lt;/p&gt;
&lt;p&gt;In the past I was able to get this working by connecting to the gateway IP of the container. For example, I have a web server running on the host listening on port 8080.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ nc -vz localhost 8080
Ncat: Version 7.92 ( https://nmap.org/ncat )
Ncat: Connected to 127.0.0.1:8080.
Ncat: 0 bytes sent, 0 bytes received in 0.02 seconds.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Next, create a new container to run &lt;code&gt;curl&lt;/code&gt; for testing.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix container to container DNS lookup failed in Podman OpenSUSE Leap 15.16</title>
      <link>https://blog.khmersite.net/p/fix-container-to-container-dns-lookup-failed-in-podman-opensuse-leap-15.16/</link>
      <pubDate>Mon, 11 Nov 2024 16:06:07 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/fix-container-to-container-dns-lookup-failed-in-podman-opensuse-leap-15.16/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve started to running more containers in my homelab with Podman, running inside AlamaLinux. Most of the times, things just worked. However today, I tried to setup similar containers on OpenSUSE Leap 15.16 host, and I came across an issue getting containers to communicate with one another. Well, spoiler alert, I found a solution, hence this blog post.&lt;/p&gt;
&lt;p&gt;TL;DR - install &lt;code&gt;cni-plugin-dnsname&lt;/code&gt; package from &lt;a href=&#34;https://build.opensuse.org/package/show/devel:microos/cni-plugin-dnsname&#34;&gt;cni-plugin-dnsname build service&lt;/a&gt;. (No package from the official OpenSUSE repo).&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to force kill a Podman container</title>
      <link>https://blog.khmersite.net/p/how-to-force-kill-podman-container/</link>
      <pubDate>Sun, 07 Jul 2024 22:43:12 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-force-kill-podman-container/</guid>
      <description>&lt;p&gt;There is a container that I cannot stop. TL;DR the solution that worked for me was rebooting the host system.&lt;/p&gt;
&lt;p&gt;Anyhow, I&amp;rsquo;ll share the troubleshooting steps that did not work.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;❯ podman stop semaphore-postgres
WARN[0010] StopSignal SIGINT failed to stop container semaphore-postgres in 10 seconds, resorting to SIGKILL
Error: given PID did not die within timeout

❯ podman ps -a | grep semaphore-postgres
a688a42c4c15  docker.io/library/postgres:16              postgres              17 minutes ago  Stopping               0.0.0.0:3000-&amp;gt;3
000/tcp                          semaphore-postgres
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Instead of &amp;ldquo;If at first you can&amp;rsquo;t stop a container, try, try again&amp;rdquo;, can we just &lt;code&gt;kill&lt;/code&gt; it?&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to use auto-update in Podman</title>
      <link>https://blog.khmersite.net/p/how-to-use-auto-update-in-podman/</link>
      <pubDate>Sat, 15 Jun 2024 18:42:35 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-use-auto-update-in-podman/</guid>
      <description>&lt;p&gt;I have a Podman container that needs periodically manual update once in a while. I&amp;rsquo;d like this container to
auto-update, and found that this was possible with podman auto-updates feature.&lt;/p&gt;
&lt;p&gt;Essentially, I need to set a label for the container - &lt;code&gt;--label io.containers.autoupdate=registry&lt;/code&gt;. More details
with and very good explanation about this topic is available at a Red Hat Enable Sysadmin article titled &amp;ldquo;&lt;a href=&#34;https://www.redhat.com/sysadmin/podman-auto-updates-rollbacks&#34;&gt;How to use auto-updates and rollbacks in Podman&lt;/a&gt;&amp;rdquo;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Run Redis in Podman Container</title>
      <link>https://blog.khmersite.net/p/how-to-run-redis-in-podman-container/</link>
      <pubDate>Wed, 22 Feb 2023 23:30:49 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-run-redis-in-podman-container/</guid>
      <description>&lt;p&gt;This is just a quick note on how to run Redis as a container using Podman on Ubuntu 22.04 (i.e. there will be no mention about SELinux.)&lt;/p&gt;
&lt;h3 id=&#34;create-a-persistent-volume-for-the-redis-container&#34;&gt;Create a persistent volume for the Redis container&lt;/h3&gt;
&lt;p&gt;I like storing all data/volume for containers under &lt;code&gt;/srv/data&lt;/code&gt;. So I&amp;rsquo;ll create a sub-directory called &lt;code&gt;redis-data&lt;/code&gt; under the same location.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# mkdir -p /srv/data/redis-data
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;pull-the-redis-image&#34;&gt;Pull the Redis image&lt;/h3&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# podman pull docker.io/redis
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;create-and-run-the-redis-container&#34;&gt;Create and run the Redis container&lt;/h3&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# podman run -d --name redis_server \
    -v /srv/data/redis-data:/var/redis/data \
    -p 6379:6379 redis
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;create-systemd-service-for-the-redis-container&#34;&gt;Create systemd service for the Redis container&lt;/h3&gt;
&lt;p&gt;I like creating a systemd service to enable/start the container.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
