docker-s3fs-client icon indicating copy to clipboard operation
docker-s3fs-client copied to clipboard

Delete mounted folder and its files when container is stopped

Open kinoute opened this issue 1 year ago • 0 comments

Thanks for this wonderful s3fs client. I was wondering what would be the best way to delete automatically the mounted folder once the s3fs container is stopped/killed/removed?

Right now, it seems, in your example, that /mnt/tmp on the host machine keeps the files/folders from the S3 bucket/the container. Is there a nice way to delete this? We are spawning s3fs container through the Docker SDK daemon port, so no SSH. The only volumes that got deleted when a container is killed are real "Docker volumes", not bind ones.

Thanks in advance!

kinoute avatar Nov 22 '24 18:11 kinoute