Ports Jail (iocage) ?

Not open for further replies.


Dec 6, 2016
Hi All,

I've seen it discussed (but not detailed) that one way to "share" ports across jails is to have a dedicated jail for building ports. I'm not quite sure how this would work in practice though. My current thought is:

1) Create a data set for the ports tree
2) Create a jail via iocage and then mount that data set a /usr/ports
3) console into that jail and fetch the portstree
4) Navigate to the specific port that I want to build and run make
5) Leave the `build` jail
6) Mount the ports tree into the target jail
7) console into the target jail, navigate to that same port and run make install

Presumably this would install the compiled binary where I want. But something doesn't feel correct here, won't the compiled dependencies get left behind if I unmount the ports tree from the target jail? Maybe I'm missing something?

Thanks for any help or clarity on the topic!
Apr 9, 2015
Nope, just build it in the jail it's intended to be used in. No need to mount and unmount. Even easier is to just use the prebuilt pkg if it's available. I would say that a good majority of things are available in a pkg which makes updating as simple as

pkg update && pkg upgrade

Even when a write up calls for ports I tend to just use the package instead. I don't see the point in making something difficult when it can be so simple and achieve the same results.
Not open for further replies.