On creation of a new workspace I would like to tak...
# general
b
On creation of a new workspace I would like to take a snapshot of a btrfs subvolume and mount that into docker container that is going to be created. When the workspace is deleted (not stopped) I want to delete the snapshot. Does anyone have pointers on how to do this? I already have a standard docker volume being created so that the user's home directory is persistent. I am not sure on how to have terraform create a btrfs snapshot that is then available for mounting. The background is that we have a large code repository that we want to be instantly available in the workspace. Instead of having every new workspace clone down the repo, we want to have the repo already cloned down on the Coder host on a btrfs subvolume. We can then create a snapshot for each each workspace to make the repo instantly available and reduce disk usage.