The `jail-task-driver` driver provides an interface for using FreeBSD jails for running application
containers. You can download the external jail-task-driver [here][jail-task-driver]. For more detailed instructions on how to set up and use this driver, please refer to the [guide][jail-task-guide].
The `jail-task-driver` driver supports most of [JAIL(8)][JAIL(8)] parameters, for a list of the currently supported parameters, please refer to the [Parameter Documentation][parameter-doc].
*`Path` - (Optional) The directory which is to be the root of the jail.
Defaults to nomad's allocation directory.
*`Ip4` - (Optional) Control the availability of IPv4 addresses. Possible values are
**"inherit"** to allow unrestricted access to all system addresses,
**"new"** to restrict addresses via Ip4_addr, and "**disable"** to stop
the jail from using IPv4 entirely.
~> Note : Setting the Ip4_addr parameter implies a value of **"new"**
*`Ip4_addr` - (Optional) A list of IPv4 addresses assigned to the jail. If this is set,
the jail is restricted to using only these addresses. Any attempts to use other addresses fail,
and attempts to use wildcard addresses silently use the jailed address instead. For
IPv4 the first address given will be used as the source address when source address selection on
unbound sockets cannot find a better match. It is only possible to start multiple jails with
the same IP address if none of the jails has more than this
single overlapping IP address assigned to itself.
*`Allow_raw_sockets` - (Optional) The jail root is allowed to create raw sockets. Setting
this parameter allows utilities like ping(8) and traceroute(8) to operate inside the jail.
If this is set, the source IP addresses are enforced to comply with the IP address bound to the jail,
regardless of whether or not the IP_HDRINCL flag has been set on the socket.
Since raw sockets can be used to configure and interact with various network subsystems, extra caution
should be used where privileged access to jails is given out to untrusted parties.
## Resource control
Resource control on jails is enforced by [RCTL(8)][rctl-doc] all parameters for resource control
are supported but the action will always be **deny**.
*`Rctl` - (Optional) Set resource limits on the jail, for a list of currently supported parameters, please refer to the [Parameter Documentation][parameter-doc].
*`Vmemoryuse` - (Optional) Address space limit,in bytes
*`Cputime` - (Optional) CPU time, in seconds
*`Datasize` - (Optional) data size, in bytes
*`Stacksize` - (Optional stack size, in bytes
*`Coredumpsize` - (Optional) core dump size, in bytes
*`Memoryuse` - (Optional) resident set size, in bytes
*`Memorylocked` - (Optional) locked memory, in bytes