4 ms·
Interestingly I just went through the same process as I wanted to understand how jails worked without the tools (my preference is iocage if you want something f
by _paulc 11y ago
Interestingly I just went through the same process as I wanted to understand how jails worked without the tools (my preference is iocage if you want something full featured - ez-jail doesn't properly handle the new jail.conf approach) - to be honest this is pretty simple and in some cases the tools just add complexity.
I ended up writing my own very simple jail wrapper [1] (~200 lines of shell) which does most of this in a very simple way - I wouldn't advise this for general use but the code is simple enough to understand what is going on behind the scenes. I chose not to use jail.conf for my use case as I wanted to dynamically create/destroy lots of jails programatically and it was easier to just call jail(8) directly in the case.
[1] https://gist.github.com/paulchakravarti/9afea9e889bc992dbdd2#file-jail-sh https://gist.github.com/paulchakravarti/9afea9e889bc992dbdd2...