bind mount
A directory of the host made visible inside the container at another path: -v /srv/myapp/uploads:/app/uploads mounts the same filesystem, not a copy, and Docker manages none of it. That is why it is right when the host has to reach the files too, to back them up — and why a database's data belongs in a named volume. It brings one problem a named volume does not: the kernel compares no user names across that boundary, only UIDs. A process running as the image's node user, UID 1000, writing into a directory owned by www-data, gets Permission denied. A chmod 775 changes nothing — that process is neither the owner nor in the group. And the chmod 777 that does work hands the directory to every account on the machine. ls -ln prints owners as numbers; chown 1000:1000 on the host is the fix.
Also written: bind-mount, host mount
