I need to dynamically create jails with a few packages preinstalled. Each jail has some of the same packages but most of them are different.
My research so far:
-Docker on FreeBSD would work fine because I can specify all the packages in Dockerfile (RUN), but Docker needs 11.0-CURRENT, is experimental and not fully implemented so I don't think I want to use it just yet.
-Ezjail does not work on FreeBSD 10 (some error with old configuration style being used). Ezjail does support FLAVOURS which I think? would work:
-Qjail seems to work best for me so far but.. Flavours only seem to have configuration changes and no setup script options. It does says it merges the filesystem when creating from flavour but then this means I would need to actually install packages into the flavour directory (is this possible?). I checked qjail flavour examples and can't find anything about installing packages. Man page does mention that you can create a SEED jail and then create jails from that archive but:
-I would need a different SEED for each jail which seems like a waste
-You need to get into the jail and install the packages to create the SEED which defeats the whole purpose.
Finally, I guess I could install packages on startup from customized rc.d but that seems wrong.
What is the best approach for the described task?
My research so far:
-Docker on FreeBSD would work fine because I can specify all the packages in Dockerfile (RUN), but Docker needs 11.0-CURRENT, is experimental and not fully implemented so I don't think I want to use it just yet.
-Ezjail does not work on FreeBSD 10 (some error with old configuration style being used). Ezjail does support FLAVOURS which I think? would work:
although I am not sure what exactly it means by packages residing in /pkg. I assume in /usr/jails/flavour directory?In its default form it will create some groups and users, change the
ownership of some files and install all packages residing under /pkg.
-Qjail seems to work best for me so far but.. Flavours only seem to have configuration changes and no setup script options. It does says it merges the filesystem when creating from flavour but then this means I would need to actually install packages into the flavour directory (is this possible?). I checked qjail flavour examples and can't find anything about installing packages. Man page does mention that you can create a SEED jail and then create jails from that archive but:
-I would need a different SEED for each jail which seems like a waste
-You need to get into the jail and install the packages to create the SEED which defeats the whole purpose.
Finally, I guess I could install packages on startup from customized rc.d but that seems wrong.
What is the best approach for the described task?