I have a web application in a Docker container. I need to limit maximum size of some of its directories. When I was not using Docker, I just created disk partitions of the limit size and put those directories to there. But since Docker seems to share disk partitions with the external system (the output of
lsblk command inside the container is exactly the same as if performed outside), this approach is not possible.
How to solve this? Is there possibly a tool which check the size of a directory and denies the permission to write if the size extends the limit?