Container cannot find mounting file in docker-compose.yml because container cannot create folder in container, which will contains mounting files.
Link to automatically creating folders in containers and mounting files When you want the container to automatically create folders or mount files:
If the container needs to have access to an SELinux-protected directory, using :z or :Z is necessary to ensure SELinux does not block it.