Create a jail package!
- What is a jail package?
- A jail package is basically a small differential image template which can be
deployed on top of vanilla jails.
The RELEASE and patch level has to match between the package and a vanilla jail.
iocage uses the record function for this, which is a unionfs mount
under the hood.
The resulting package can be stored on a web server with a checksum file ready
to be deployed anywhere.
- create a new jail iocage create -c tag=nginx
- start jail iocage start UUID | TAG
- configure networking to enable internet access for this jail
- issue iocage record start UUID | TAG, from now on every change will be recorded
under /iocage/jails/UUID/recorded
- install nginx with pkg install nginx
- install any other software you might require
- customize configuration files
- once finished, stop recording changes with iocage record stop UUID | TAG
optionally stop jail
- examine /iocage/jails/UUID/recorded, run find
/iocage/jails/UUID/recorded -type f
- remove any unnecessary files, make final customization/changes
- run iocage package UUID | TAG, this will create a package in
/iocage/packages with a SHA256 checksum file
- optionally discard the jail now with iocage destroy UUID | TAG
The resulting UUID.tar.xz can now be deployed on top of any new vanilla
jail!
- create new jail iocage create -c
- deploy package iocage import UUID tag=myjail
- list jail iocage list|grep myjail, grab UUID
- start jail iocage start UUID | TAG
- examine your changes and packages - they are all there!
Enjoy!