# Ports Jail



## zader (Jan 9, 2020)

Hi Guys,

I noticed in some of the other threads people were building ports in a jail.. just wondering if someone could explain the jist of that.. or how one would go about creating it?  or even migrating to a ports jail from a guest with portmaster and built ports.

I'm guessing the basic concept is create a jail, download ports and update as normal.. then run portmaster www/firefox .. you end up with a binary.. and copy that to the host? .. or do you set up a repository and change pkg to use your own? 

I had a look for a how to, but not sure exactly what Im looking for..

i guess if its possible to build a jailed repo.. I would need to figure out how to also rebuild all my installed ports from that ..


thanks!


----------



## SirDice (Jan 9, 2020)

zader said:


> I noticed in some of the other threads people were building ports in a jail.. just wondering if someone could explain the jist of that.. or how one would go about creating it? or even migrating to a ports jail from a guest with portmaster and built ports.


Use ports-mgmt/poudriere or ports-mgmt/synth. It does all that (and more) automatically.


----------



## zader (Jan 9, 2020)

oh cool, ok thanks.. will this require rebuilding all of the ports I have already built with portmaster?


----------



## SirDice (Jan 9, 2020)

zader said:


> will this require rebuilding all of the ports I have already built with portmaster?


Both tools spawn jails to build each individual port in a clean environment. This will ensure the dependency chain is correct.


----------

