<story><title>Jails on FreeBSD</title><url>https://ogris.de/howtos/freebsd-jails.html</url></story><parent_chain></parent_chain><comment><author>jmillikin</author><text>Whenever an article about FreeBSD&amp;#x27;s jails gets posted here, the comments tend to drift toward an argument about jails vs Docker containers. People call them &amp;quot;Linux containers&amp;quot;, but really they&amp;#x27;re talking about Docker (or its clones like Podman).&lt;p&gt;This may be me shouting into the void, but I wish there were an article directly comparing jails with &lt;i&gt;namespaces&lt;/i&gt;, which is the Linux functionality that Docker uses. I can totally believe that FreeBSD jails provide a better &amp;#x2F; more unified &amp;#x2F; more secure experience than Docker, but to extend that into saying &amp;quot;FreeBSD jails are better than Linux namespaces&amp;quot; feels like a category error.&lt;p&gt;Questions I would like to see answered in that article:&lt;p&gt;* Can jails be used to run subprocesses in the normal filesystem, but with a different network environment (for example making a given command run its net traffic through TAP)?&lt;p&gt;* Can jails be used to limit memory&amp;#x2F;cpu&amp;#x2F;IO&amp;#x2F;network for subprocesses? For threads within a process?&lt;p&gt;* Can live processes be moved into or out of a jail?&lt;p&gt;* Can jails be used to make a process think it&amp;#x27;s running as a different user?&lt;p&gt;I feel like the answer to these questions is generally &amp;quot;no, that&amp;#x27;s not what jails are for&amp;quot;, which is (1) a fine answer given the apparent goal of being a better chroot(), and (2) reinforces that jails and namespaces are addressing different problem domains.</text></comment>
<story><title>Jails on FreeBSD</title><url>https://ogris.de/howtos/freebsd-jails.html</url></story><parent_chain></parent_chain><comment><author>codetrotter</author><text>Let me chime in and say, Michael W Lucas has an awesome book about FreeBSD Jails. I bought it recently and I read the whole thing and it helped me a lot. I still had to figure some things out by myself because the book is for a slightly older version of FreeBSD. But it is an awesome book.&lt;p&gt;I use only the tools included in base system for setting up my jails. No “ezjail” or anything.&lt;p&gt;If you read his whole book you will see how it might be the correct choice to just do it yourself. Depending on what you want to do etc.&lt;p&gt;For me I am definitely much better off having set it up myself with the help of mwl’s book.&lt;p&gt;&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;www.freebsdmall.com&amp;#x2F;cgi-bin&amp;#x2F;fm&amp;#x2F;bsdmjails&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;www.freebsdmall.com&amp;#x2F;cgi-bin&amp;#x2F;fm&amp;#x2F;bsdmjails&lt;/a&gt;&lt;p&gt;Buy the physical copy of the book.&lt;p&gt;PS: Use vnet interfaces for most of your jails.</text></comment>