Whenever a container is stopped, restarted or deleted, I would like it to execute a bash command for the host machine.
E.g. fusermount -u /path/to/folder
But I have not figured out a way to do this in the compose file. What I have in mind is similar to the Exec STOP
function of systemd too.