Tutorial asked, how to install poudriere in a jail on zfs

An interesting setup is the following.

root on zfs
Create a jail
Install poudriere in this jail
Note , this will create recursive jails
Install nginx in this jail
Serve a package repository.

But this setup is not simple. So a howto is nicely welcomed.
Vermaden ?
 
A ZFS is not absolutely necessary in the jail. If there is no ZFS present in the jail, traditional directories are created by ports-mgmt/poudriere automatically.

But if you insist on ZFS inside jails, these are the following settings necessary to manage datasets (specific for poudriere here in this example):

On host, add to jail.conf (besides other necessary jail.conf(8) parameters)
Code:
allow.mount;
allow.mount.zfs;
enforce_statfs = 1;
See zfs-jail(8) for documentation.

Code:
 # zfs create -o jailed=on zroot/poudriere

Start jail, attach specified dataset to the jail:
Code:
 # zfs  jail  <jail_name_or_id>  zroot/poudriere
Apparently there is no automation for zfs-jail(8) (EDIT: there is actually, see jail.conf below), it must be done manually every time after the jail is started, or custom scripted:

jail.conf
Code:
exec.poststart = "zfs jail <jail_name> zroot/poudriere"

Then, open a jail console, inside jail, if necessary, edit /usr/local/etc/poudriere.conf, create, deploy poudriere jail.
 
An interesting setup is the following.

root on zfs
Create a jail
Install poudriere in this jail
Note , this will create recursive jails
Install nginx in this jail
Serve a package repository.

But this setup is not simple. So a howto is nicely welcomed.
Vermaden ?
Why? What's the point?
 
In the case you want some details on how to create a jail with a ZFS dataset:


And more specifically what you have requested:

* * https://vermaden.wordpress.com/2025/07/03/poudriere-inside-freebsd-vnet-jail/
 
Back
Top