The --template option in systemd-nspawn will take a filesystem, make a btrfs snapshot of it, and run the container in the snapshot, then destroy the snapshot when it's over.
The same functionality could be implemented with overlay(fs) in kernels newer or equal than 3.18, for systems not running on btrfs. The base filesystem would be the read-only lower layer of the overlay, and the write layer can be in a tmpfs or anywhere else on the real filesystem.
Additionally, the overlay(fs) now also supports more than one read-only layer.
Also food for thought, it might be an interesting option to have the write layer persistent - but that would diverge from the btrfs usage.
I guess this is fixed in systemd 220 and the new --overlay= and --overlay-ro= options:
(In reply to Damjan Georgievski from comment #1)
> I guess this is fixed in systemd 220 and the new --overlay= and
> --overlay-ro= options:
Not really. We don't support this in --template=.
There's now --volatile=overlayfs since 242. Let's close this. If there's anything else missing in this, please file an RFE issue on the github instance instead.