Docker Community Forums

Share and learn in the Docker community.

Limit disk space in a Docker container


(Aleksey Kozin) #1

Hi,
I want to write an integration test
I want to check how my program behaves in the absence of free disk space
My plan was to somehow limit free disk space in a container and run the binaries

I don’t have an option to change file system to xfs

How can I do this with docker?
Do you know other solutions?


(Martin Terp) #2

Hi :slight_smile:

Take a look at this https://docs.docker.com/engine/reference/commandline/run/#set-storage-driver-options-per-container


(Aleksey Kozin) #3

Hi, Martin
Thx for the replay
This solution doesn’t work for me:

docker: Error response from daemon: --storage-opt is supported only for overlay over xfs with ‘pquota’ mount option.

I don’t have xfs file system, and I don’t have option to change it
Do you know any other solution?