I am using docker compose (context: home server, OS is Manjaro Gnome) and use a service called FileRun as my filecloud. Filerun can be compared to Nextcloud. It supports webDAV.
The issue is that webDAV believes all my files have changed, when I reboot my server. This is caused by Docker giving a new device ID to a volume mount after restarting or rebooting.
This is confirmed by running stat command within the container on the mounted volume:
before a reboot:
I already figured out the syntax, but whatever ID I fill in (made up), I always get the exact same error with a totally different ID:
docker-compose up -d
[+] Running 0/1
⠴ Container filerun Creating
Error response from daemon: failed to mount local volume: mount /mnt/pool/users:/user-files:/var/lib/docker/volumes/docker_userdata/_data, data: id=2aho42d: no such device
I tried it and it gave me the same ID when I mounted something from the host. I don’t know why it would do otherwise unless you are mounting a tmpfs volume which you quoted. Which I didn’t try but it would be understandable, because that is not a persistent volume. I didn’t try network filesystem either. Is your mounted folder is on a network filesystem?
I also tried the command that you shared to create a tmpfs volume with custom ID, and it failed because ID is not a valid option. Where did you see that used?