Docker Community Forums

Share and learn in the Docker community.

Bug Mounted Partition


(Smida) #1

Hi guys,

I would like to know why when i run a debian docker ( i don’t know if there is the same probleme with others distributions ) and i do # df -h i :

root@1cf86591c1e7:/etc# df -h
Filesystem Size Used Avail Use% Mounted on
none 286G 20G 252G 8% /
tmpfs 2.0G 0 2.0G 0% /dev
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda1 286G 20G 252G 8% /etc/hosts
shm 64M 0 64M 0% /dev/shm

I don’t understand this " /dev/sda1 286G 20G 252G 8% /etc/hosts " i have to umount this and then i don’t have /etc/hosts but /etc/hostname and then i umount it and i have /etc/resolv.conf .

After all this i have this ;

none 286G 20G 252G 8% /
tmpfs 2,0G 0 2,0G 0% /dev
tmpfs 2,0G 0 2,0G 0% /sys/fs/cgroup
shm 64M 0 64M 0% /dev/shm

Then i have to recreate this 3 files with this old content to have my container working.

Thx i want to understand this.