Trying to use shared bind mount when container uid doesnt match

To satisfy unix file permissions the UID:GID of the folder owner should match the UID:GID of the process started inside the container.

I tried to explain in this post how to identify the UID:GID. Though, often you find it documented in the docker hub description.

Some images provide environment variables to set the UID GID, those start as root, often chown files, but start the main process with the restricted UID:GID. Some start as restricted user right away, and can be configured with docker run -u uid:gid or in a compose file with user: uid:gid.