<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Advanced on Lima</title><link>https://deploy-preview-5702--lima-vm.netlify.app/docs/examples/containers/containerd/advanced/</link><description>Recent content in Advanced on Lima</description><generator>Hugo</generator><language>en</language><atom:link href="https://deploy-preview-5702--lima-vm.netlify.app/docs/examples/containers/containerd/advanced/index.xml" rel="self" type="application/rss+xml"/><item><title>Enhanced supply chain security with gomodjail</title><link>https://deploy-preview-5702--lima-vm.netlify.app/docs/examples/containers/containerd/advanced/gomodjail/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-5702--lima-vm.netlify.app/docs/examples/containers/containerd/advanced/gomodjail/</guid><description>&lt;p&gt;&lt;a href="https://github.com/AkihiroSuda/gomodjail"&gt;gomodjail&lt;/a&gt; is an experimental library sandbox for Go modules.&lt;/p&gt;
&lt;p&gt;gomodjail imposes syscall restrictions on a specific set of Go modules, so as to mitigate their potential vulnerabilities and supply chain attack vectors.
A restricted module is hindered to access files and execute commands.&lt;/p&gt;
&lt;p&gt;gomodjail can be enabled for nerdctl by using the &lt;code&gt;nerdctl.gomodjail&lt;/code&gt; binary.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-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;lima nerdctl.gomodjail ...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For the gomodjail policy applied to &lt;code&gt;nerdctl.gomodjail&lt;/code&gt;, see &lt;a href="https://github.com/containerd/nerdctl/blob/main/go.mod"&gt;https://github.com/containerd/nerdctl/blob/main/go.mod&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Accelerating rootless networking with bypass4netns</title><link>https://deploy-preview-5702--lima-vm.netlify.app/docs/examples/containers/containerd/advanced/bypass4netns/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-5702--lima-vm.netlify.app/docs/examples/containers/containerd/advanced/bypass4netns/</guid><description>&lt;p&gt;&lt;a href="https://github.com/rootless-containers/bypass4netns"&gt;bypass4netns&lt;/a&gt; is an experimental accelerator for rootless networking.&lt;/p&gt;
&lt;p&gt;On macOS hosts, it is highly recommended to use the &lt;a href="https://deploy-preview-5702--lima-vm.netlify.app/docs/config/network/vznat/"&gt;vzNAT&lt;/a&gt; networking in conjunction
to reduce the overhead of Lima&amp;rsquo;s user-mode networking:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-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;limactl start --network vzNAT
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To enable bypass4netns, the daemon process (&lt;code&gt;bypass4netnsd&lt;/code&gt;) has to be installed in the VM as follows:&lt;/p&gt;
&lt;!-- TODO: install by default --&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-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;lima containerd-rootless-setuptool.sh install-bypass4netnsd
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then run a container with an annotation &lt;code&gt;nerdctl/bypass4netns=true&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-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 style="color:#8f5902;font-style:italic"&gt;# 192.168.64.1 is the IP address of the &amp;#34;bridge100&amp;#34; interface on the macOS host&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;lima nerdctl run --annotation nerdctl/bypass4netns&lt;span style="color:#ce5c00;font-weight:bold"&gt;=&lt;/span&gt;&lt;span style="color:#204a87"&gt;true&lt;/span&gt; alpine &lt;span style="color:#4e9a06"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; sh -euc &lt;span style="color:#4e9a06"&gt;&amp;#39;apk add iperf3 &amp;amp;&amp;amp; iperf3 -c 192.168.64.1&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Benchmark result:&lt;/p&gt;</description></item><item><title>Accelerating start-up time with eStargz</title><link>https://deploy-preview-5702--lima-vm.netlify.app/docs/examples/containers/containerd/advanced/stargz/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-5702--lima-vm.netlify.app/docs/examples/containers/containerd/advanced/stargz/</guid><description>&lt;p&gt;&lt;a href="https://github.com/containerd/stargz-snapshotter"&gt;eStargz&lt;/a&gt; is an OCI-compatible container image format
that reduces start-up latency using lazy-pulling technique.&lt;/p&gt;
&lt;p&gt;The support for eStargz is available by default in Lima.&lt;/p&gt;
&lt;p&gt;The timings below were measured on an Apple M5 Max (macOS, VZ-backend Lima, default template) pulling the native arm64 images. Numbers are a median of three cold runs (image removed with &lt;code&gt;nerdctl rmi&lt;/code&gt; between each run).&lt;/p&gt;
&lt;p&gt;Without eStargz:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#8f5902"&gt;$&lt;/span&gt; &lt;span style="color:#204a87"&gt;time&lt;/span&gt; lima nerdctl run ghcr.io/stargz-containers/python:3.13-org python3 -c &lt;span style="color:#4e9a06"&gt;&amp;#39;print(&amp;#34;hi&amp;#34;)&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#000;font-style:italic"&gt;hi
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a40000"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#000;font-style:italic"&gt;real	0m14.031s
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#000;font-style:italic"&gt;user	0m0.017s
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#000;font-style:italic"&gt;sys	0m0.018s
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;With eStargz:&lt;/p&gt;</description></item></channel></rss>