Hi There
I am trying to use docker compose (as a learning exercise for myself) to run a Jellyfin container with 2 volumes for config and cache and a bind mount for the media.
My compose file is specifying that user should be 113:119 which is the UID/GID ownership of the folders where the volumes are configured
version: '3.5'
services:
jellyfin:
image: jellyfin/jellyfin
container_name: jellyfin
user: 113:119
network_mode: 'host'
volumes:
- /jftest-config:/config
- /jftest-cache:/cache
- type: bind
source: ./jftest-m
target: /media
read_only: true
The folders involved in the volumes / bind mounts have the following permissions
user@host:~/jellyfin-compose$ ls -aln / | grep jftest
drwxr-xr-x 2 113 119 4096 Jun 29 21:36 jftest-cache
drwxr-xr-x 2 113 119 4096 Jun 29 21:36 jftest-config
The container is running with the UID/GID specified, which is the ones that owns the folders above
user@host:~/jellyfin-compose$ docker inspect -f '{{.Config.User}}' jellyfin
113:119
Yet, I get this error in the container indicating that the volume /config (which is on host path /jftest-config) is not accesible by the application in the container
Unhandled exception. System.UnauthorizedAccessException: Access to the path '/config/log' is denied.
---> System.IO.IOException: Permission denied
Any idea what I am doing wrong ?
Thanks in advance.