Docker Community Forums

Share and learn in the Docker community.

`df` in container shows space of the host system

I’m trying limit disk space of a container image (ultimately, I need to make it go out of space). So I do:

$ docker run -it --storage-opt size=200M fedora:latest
[root@ad312aa0f1f6 /]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5       267G  245G   17G  94% /
tmpfs            64M     0   64M   0% /dev
tmpfs           3.7G     0  3.7G   0% /sys/fs/cgroup
/dev/sda5       267G  245G   17G  94% /etc/hosts
shm              64M     0   64M   0% /dev/shm
tmpfs           3.7G     0  3.7G   0% /proc/asound
tmpfs           3.7G     0  3.7G   0% /proc/acpi
tmpfs           3.7G     0  3.7G   0% /proc/scsi
tmpfs           3.7G     0  3.7G   0% /sys/firmware
[root@ad312aa0f1f6 /]#

Huh, what? It says / has 17G available, whereas I explicitly gave the container just 200M. FWIW, the 17G is free space of the surrounding host system.

I asked on IRC, to no avail. If you don’t know how to fix this, but do know where to report a bug, that’s fine too. https://github.com/docker/ has a lot of components, I’m not sure where to report this.