DEV Community

Discussion on: As a developer, what are the cool things you like to do with containers?

Collapse
darkain profile image
Vincent Milum Jr

I use FreeBSD Jails for my containerization platform.

Instead of doing any dev locally at all, this is how I've done things since before I can remember...

Host Server OS has NFS/Samba file share for the working directory. I mount that remotely on whatever workstation I happen to be on at the time (this allows me to jump workstations without missing a beat!)

That share is then nullfs mounted into a Jail to run the code.

That container is setup 100% identical to how production runs, except the FS is nullfs instead of a local ZFS dataset.

There is NEVER any worry about "works on my system" syndrome, because the exact versions of FreeBSD, Nginx, PHP, MariaDB, and all related utilities are literally 100% identical, even down to running on the same hardware.

ZFS and Jails also enable some wickedly cool things, too. I can easily snapshot a jail, and then replicate that exact jail state on any other host. There are no custom or proprietary tools. ZFS does all of this natively, and has a very well supported ecosystem.

This also means that changes can be tested and rolled back effortlessly, not just in code changes, but INFRASTRUCTURE changes! Want to upgrade a database to a new version? But then IT BREAKS? Just roll back to the previous ZFS snapshot. This is done in literally seconds.

There are tons of prototyping advantages to this, its just endless possibilities with very easy to use tooling compared to what's available on other OSes. :)