Docker Community Forums

Share and learn in the Docker community.

CentOS in docker container thinks it has 0 bytes left on root

MacOS: Mojave 10.14.6
Docker: 2.0.0.3 (Engine: 18.09.2)

Hi!
I have a CentOS container (running in docker on MacOS), which reports all of a sudden (after months of use) that there’s no space left on the root partition:

[root@f2a511e154e7 lib]# df -h /
Filesystem      Size  Used Avail Use% Mounted on
overlay          59G   58G     0 100% /

although the amount of space used by files is nowhere near that size:

[root@f2a511e154e7 /]# du -sm * .* 2>/dev/null | sort -n
0       bin
0       dev
0       lib
0       lib64
0       proc
0       sbin
0       sys
1       .
1       anaconda-post.log
1       boot
1       dockerstartup
1       home
1       media
1       mnt
1       opt
1       run
1       srv
2       tmp
13      etc
50      seamonkey
139     root
400     var
2291    usr
2513    headless
34389   host-drive

… where host-drive is just a mapped directory to a host directory, so it shouldn’t matter:

[root@f2a511e154e7 host-drive]# df -h .
Filesystem      Size  Used Avail Use% Mounted on
osxfs           466G  380G   77G  84% /host-drive

This is what it looks like on the MacOS host where Docker.raw is:

~/Library/Containers/com.docker.docker/Data/vms/0> du -sm Docker.raw 
60835	Docker.raw

~/Library/Containers/com.docker.docker/Data/vms/0> df -h .
Filesystem     Size   Used  Avail Capacity iused               ifree %iused  Mounted on
/dev/disk1s1  466Gi  380Gi   75Gi    84% 5885239 9223372036848890568    0%   /

→ So why on Earth does the CentOS container think there’s no space left on it? And more importantly, how do I fix that? What do I delete?

Thanks!