Limiting the storage space available for each container


#1

Hello. First of all i would like to thank Open Analytics on developing ShinyProxy. It is truly awesome and helped me a lot. I have a small problem however. My application allows users to write their own code, thus anyone would be able to create a simple script to create a huge file that would not allow other users to use the system properly. Is there any way I can limit the storage capacity for each user (and possibly other resources as well, such as processor and memory)?

Thanks in advance!


#2

Hi @Bruno_Pereira,

As mentioned here: https://github.com/moby/moby/issues/3804 using quota on the docker level seems quite tricky, and it appears that people are using volume mounts with quota on the host os level instead.

In that scenario, you could give each user a private volume, and mount that into the container.
This is something we hope to have available soon, see here for more info: https://github.com/openanalytics/shinyproxy/issues/18

Memory can be limited via a configuration setting, see docker-memory at https://www.shinyproxy.io/configuration/#apps

Regards,
Frederick


#3

Thank you very much for your answer!