jails How do I create a jail with my preferred shell and aliases

I use scripts (long, verbose example below). But, yes. I create a template jail which I use to set up other jails from. When I create a template jail/base, I (actually) typically keep a few known config type files and place them into /usr/share/skel in the template so all my jail setup scripts have to do is just create a user.

Example:
 
I'm guessing that I need to set up some sort of template..
Don't you use sysutils/iocage?

https://iocage.readthedocs.io/en/latest/jailtypes.html#template .

Template

Template jails are customized jails used to quickly create further custom jails.

For example, after creating a jail, the user customizes that jail’s networking properties.Once satisfied, the
user then changes the jail into a template with:

# iocage set template=yes examplejail

After this operation the jail is found in the templates list:

# iocage list -t

And new jails with the user customized networking can be created:

# iocage create -t examplejail -n newexamplejail

Template jails are convertable by setting the template= property.

https://iocage.readthedocs.io/en/latest/templates.html .
Using Templates

Templates can save precious time!

Set up a jail and create a template from it. All packages and preconfigured settings remain available for deployment to new jails within seconds.

Any jail can be converted between jail and template as needed. Essentially, a template is just another jail which has the property template set to yes. The difference is templates are not started by iocage.

Create a template with iocage:
 
Back
Top