My docker-compose.yml
(for Immich, in case it's important) contains this:
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
- /data/NAS_Photos:/mnt/NAS_Photos:ro # <-- The one I'm having trouble with
The intention (for the avoidance of doubt) is to make /data/NAS_Photos
from my host available inside the container at /mnt/NAS_Photos
.
When I docker-compose up -d
the relevant container has a directory /mnt/NAS_Photos
but mount | grep -i mnt
shows
none on /mnt/NAS_Photos type tmpfs (ro,relatime,inode64)
Additionally the directory is almost empty. It does not contain the contents of my /data/NAS_Photos
. (It does contain a few leftover files from previous attempts to debug this, and if I move the mount to a different location inside the container the leftover files appear there too. These files persist if I docker compose down
and docker compose up
.)
Why would this not be mounted, or, how can I debug why it isn't mounted? No error messages are given that I can see.
Using Ubuntu Server 22.04.3 LTS.
What I have checked:
/data
is owned by my user, and permissions on it, and/data/NAS_Photos
are both 777.I can mount a directory in the same location as the
docker-compose.yml
without a problem.The output of
docker inspect -f '{{ .Mounts }}' immich_microservices
is:[{bind /home/mark/Immich/library /usr/src/app/upload rw true rprivate} {bind /etc/localtime /etc/localtime ro false rprivate} {bind /data/NAS_Photos /mnt/NAS_Photos ro false rprivate}]
Thanks in advance!