Dumb question, but I'm a bit confused. When I run df -h, I get the following output:

enter image description here

Why does each mount corresponding to a Docker container running say that it is 26GB? Does this mean that all of the containers have access to the full 26GB of the root filesystem? I was hoping to be able to limit the size that the containers could use so that the root filesystem doesn't run out of space in the event that the container uses up all of the storage capacity.


That is what Overlay is about -- to enable the container to access the host's whole file system.

If you want to impose a limit on the container, you should mount a disk volume (something other than the disk volume holding the root filesystem) at some convenient place in the server root filesystem, then define the container volumes to paths under that mountpoint.

| improve this answer | |
  • Gotcha, thanks for the answer. I'll look into mounting a disk volume then. – AndreasKralj Jun 18 '19 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.