The FreeBSD jail mechanism is an implementation of operating system-level virtualization that allows administrators to partition a FreeBSD-based computer system into several independent mini-systems called jails.

Operating-system-level virtualization is a server virtualization method in which the kernel of an operating system allows the existence of multiple isolated user-space instances, instead of just one. Such instances, which are sometimes called containers, software containers, virtualization engines (VEs) or jails (FreeBSD jail or chroot jail), may look and feel like a real server from the point of view of its owners and users.

On Unix-like operating systems, this technology can be seen as an advanced implementation of the standard chroot mechanism. In addition to isolation mechanisms, the kernel often provides resource-management features to limit the impact of one container's activities on other containers.

🔗FreeBSD the big picture


🔗FreeBSD jails != docker

Jails are rock solid proven technology used by many companies the workflow and concept is very different from docker and because of that is not possible to do a comparison between them.

Try to compare them is difficult and unfair, for example, doing a very bad analogy I would say that kubernetes + Docker is something similar to what you get when using jails on the Linux ecosystem, not even mentioning the ZFS capabilities and full network stack support available within a jail.

🔗Creating a jail

Create the dataset for the jails:

# zfs create -o mountpoint=/jails tank/jails
# zfs create tank/jails/base