Zend certified PHP/Magento developer

Permission issues when binding mounting a Fuse mount to a Docker container

Ok, I have an interesting one I could use everyones help on.

I am using “rclone mount” to mount a remote directory to my host (Ubuntu Server). I then want to use Docker Compose to set the remote mounted directory into a Docker container volume. I have tried separate ways and all of them result in some form of a permissions error.

* Paths have been simplified for ease of following.

The rclone mount is at ~/parent/remote.

If I try to set ~/parent as the volume, I get the below error.

volumes:  
    - ./parent:/parent

# This results in the remote folder having all "?" as its permissions inside the container.

drwxr-xr-x 4 abc abc 4096 Apr 25 08:38 ..
d????????? ? ?   ?      ?            ? remote

If I try to set ~/parent/remote as the volume, I get the below error on docker compose up.

volumes:  
    - ./parent/remote:/remote

Error response from daemon: error while creating mount source path '~/parent/remote': mkdir ~/parent/remote: file exists

Lastly, I have tried using a bind mount with propagation settings and I get the below error:

volumes: 
  - type: bind
    source: ./parent/remote
    target: /remote
    bind:
      propagation: shared

Error response from daemon: error while creating mount source path '~/parent/remote': mkdir ~/parent/remote: file exists

How can I mount the rclone mount directory as a volume into a Docker container?