<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title>there was a fish in the calculator</title><id>https://fishinthecalculator.me/feeds/tags/podman.xml</id><subtitle>Tag: podman</subtitle><updated>2026-05-05T22:13:01Z</updated><link href="https://fishinthecalculator.me/feeds/tags/podman.xml" rel="self" /><link href="https://fishinthecalculator.me" /><entry><title>Unprivileged container management on the Guix System</title><id>https://fishinthecalculator.me/blog/unprivileged-container-management-on-the-guix-system.html</id><author><name>Giacomo Leidi</name><email>therewasa@fishinthecalculator.me</email></author><updated>2024-08-23T04:20:00Z</updated><link href="https://fishinthecalculator.me/blog/unprivileged-container-management-on-the-guix-system.html" rel="alternate" /><content type="html">&lt;p&gt;Docker is known to have less than optimal security defaults, hence the hype for Podman. If you want to run rootless containers in your Guix System, it is sufficient to add the following to your &lt;code&gt;operating-system&lt;/code&gt; configuration.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;use-service-modules&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;containers&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;networking&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;use-modules&lt;/span&gt; &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;gnu&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;system&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;accounts&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;syntax-comment&quot;&gt;;for 'subid-range'
&lt;/span&gt;
&lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;operating-system&lt;/span&gt;
  &lt;span class=&quot;syntax-symbol&quot;&gt;...&lt;/span&gt;
  &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;users&lt;/span&gt; &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;cons&lt;/span&gt; &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;user-account&lt;/span&gt;
                &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;syntax-string&quot;&gt;&amp;quot;alice&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;
                &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;comment&lt;/span&gt; &lt;span class=&quot;syntax-string&quot;&gt;&amp;quot;Your own user&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;
                &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;group&lt;/span&gt; &lt;span class=&quot;syntax-string&quot;&gt;&amp;quot;users&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;

                &lt;span class=&quot;syntax-comment&quot;&gt;;; Adding the account to the &amp;quot;cgroup&amp;quot; group
&lt;/span&gt;                &lt;span class=&quot;syntax-comment&quot;&gt;;; makes it possible to run podman commands.
&lt;/span&gt;                &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;supplementary-groups&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-string&quot;&gt;&amp;quot;cgroup&amp;quot;&lt;/span&gt; &lt;span class=&quot;syntax-string&quot;&gt;&amp;quot;wheel&amp;quot;&lt;/span&gt;
                                        &lt;span class=&quot;syntax-string&quot;&gt;&amp;quot;audio&amp;quot;&lt;/span&gt; &lt;span class=&quot;syntax-string&quot;&gt;&amp;quot;video&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;
               &lt;span class=&quot;syntax-symbol&quot;&gt;%base-user-accounts&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;services&lt;/span&gt;
    &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;append&lt;/span&gt; &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;service&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;iptables-service-type&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;
                  &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;service&lt;/span&gt; &lt;span class=&quot;syntax-symbol&quot;&gt;rootless-podman-service-type&lt;/span&gt;
                           &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;rootless-podman-configuration&lt;/span&gt;
                             &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;subgids&lt;/span&gt;
                               &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;subid-range&lt;/span&gt; &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;syntax-string&quot;&gt;&amp;quot;alice&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;
                             &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;subuids&lt;/span&gt;
                               &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;subid-range&lt;/span&gt; &lt;span class=&quot;syntax-open&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;syntax-symbol&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;syntax-string&quot;&gt;&amp;quot;alice&amp;quot;&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;syntax-symbol&quot;&gt;%base-services&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;syntax-close&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can now run &lt;code&gt;guix system reconfigure ...&lt;/code&gt;, after Guix is done, reboot your machine and you should be able to run Podman containers. This is the hello world suggested by Podman:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;$ podman run -it --rm docker.io/alpine cat /etc/*release*
NAME=&amp;quot;Alpine Linux&amp;quot;
ID=alpine
VERSION_ID=3.20.2
PRETTY_NAME=&amp;quot;Alpine Linux v3.20&amp;quot;
HOME_URL=&amp;quot;https://alpinelinux.org/&amp;quot;
BUG_REPORT_URL=&amp;quot;https://gitlab.alpinelinux.org/alpine/aports/-/issues&amp;quot;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;and with &lt;code&gt;guix shell podman-compose&lt;/code&gt;, you can run this &lt;a href=&quot;https://github.com/fishinthecalculator/rootless-podman-nginx-static-server&quot;&gt;Podman compose hello world&lt;/a&gt; from the root of the repository:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;$ mkdir data
$ echo hello world &amp;gt; data/index.html
$ podman compose up -d

...

exit code: 0
$ curl localhost:8080
hello world&lt;/code&gt;&lt;/pre&gt;</content></entry></feed>