docker-compose.yaml I have mounted directory
/var/www/ (for clarity I will name this directory as
/foo/bar/) as volume
/var/www/ in my Docker container (to have Apache document root directory from host available in Docker container).
.... volumes: - /foo/bar/:/var/www/ ...
It worked very well until now. Now I had to enlarge space for websites and mounted new disk partition into
/foo/bar/hdd2 in host. New partition is mounted as
cat /proc/mounts | grep hdd2 /dev/vdb1 /foo/bar/hdd2 ext4 rw,relatime 0 0
But I do not see content of
/foo/bar/hdd2 in Docker container, the directory
/var/www is empty even though there are files/directories in the directory in host environment.
root@http:/var/www/hdd2# ls -la total 8 drwxr-xr-x 2 www-data www-data 4096 May 27 19:03 . drwxrwxr-x 23 www-data www-data 4096 May 27 19:03 ..
Is there any reason why I can’t see the content of the directory linked to the new disk partition in the Docker container’s volume directory?