jlesage / docker-handbrake

Docker container for HandBrake
MIT License
932 stars 98 forks source link

Handbrake crashes on start permissions denied error #384

Closed Betonhaus closed 4 months ago

Betonhaus commented 4 months ago

Current Behavior

handbrake refuses to launch. according to logs it has a permissions error but all folders it uses it has full ownership access to

Expected Behavior

normal startup

Steps To Reproduce

docker compose up -d

Environment

Container creation

handbrake: image: jlesage/handbrake container_name: handbrake ports:

Container log

[init        ] container is starting...
[cont-env    ] loading container environment variables...
[cont-env    ] APP_NAME: loading...
[cont-env    ] APP_VERSION: loading...
[cont-env    ] DISPLAY: executing...
[cont-env    ] DISPLAY: terminated successfully.
[cont-env    ] DISPLAY: loading...
[cont-env    ] DOCKER_IMAGE_PLATFORM: loading...
[cont-env    ] DOCKER_IMAGE_VERSION: loading...
[cont-env    ] EGL_LOG_LEVEL: executing...
[cont-env    ] EGL_LOG_LEVEL: terminated successfully.
[cont-env    ] EGL_LOG_LEVEL: loading...
[cont-env    ] GSK_RENDERER: executing...
[cont-env    ] GSK_RENDERER: terminated successfully.
[cont-env    ] GSK_RENDERER: loading...
[cont-env    ] GTK2_RC_FILES: executing...
[cont-env    ] GTK2_RC_FILES: terminated successfully.
[cont-env    ] GTK2_RC_FILES: not setting variable.
[cont-env    ] GTK_THEME: executing...
[cont-env    ] GTK_THEME: terminated successfully.
[cont-env    ] GTK_THEME: not setting variable.
[cont-env    ] HOME: loading...
[cont-env    ] INSTALL_PACKAGES_INTERNAL: executing...
[cont-env    ] INSTALL_PACKAGES_INTERNAL: terminated successfully.
[cont-env    ] INSTALL_PACKAGES_INTERNAL: not setting variable.
[cont-env    ] LIBGL_DRIVERS_PATH: executing...
[cont-env    ] LIBGL_DRIVERS_PATH: terminated successfully.
[cont-env    ] LIBGL_DRIVERS_PATH: loading...
[cont-env    ] PULSE_CONFIG_PATH: executing...
[cont-env    ] PULSE_CONFIG_PATH: terminated successfully.
[cont-env    ] PULSE_CONFIG_PATH: not setting variable.
[cont-env    ] PULSE_COOKIE: executing...
[cont-env    ] PULSE_COOKIE: terminated successfully.
[cont-env    ] PULSE_COOKIE: not setting variable.
[cont-env    ] PULSE_SERVER: executing...
[cont-env    ] PULSE_SERVER: terminated successfully.
[cont-env    ] PULSE_SERVER: not setting variable.
[cont-env    ] QT_STYLE_OVERRIDE: executing...
[cont-env    ] QT_STYLE_OVERRIDE: terminated successfully.
[cont-env    ] QT_STYLE_OVERRIDE: not setting variable.
[cont-env    ] SUP_GROUP_IDS_INTERNAL: executing...
[cont-env    ] SUP_GROUP_IDS_INTERNAL: terminated successfully.
[cont-env    ] SUP_GROUP_IDS_INTERNAL: loading...
[cont-env    ] TAKE_CONFIG_OWNERSHIP: loading...
[cont-env    ] XDG_CACHE_HOME: loading...
[cont-env    ] XDG_CONFIG_HOME: loading...
[cont-env    ] XDG_DATA_HOME: loading...
[cont-env    ] XDG_RUNTIME_DIR: loading...
[cont-env    ] XDG_STATE_HOME: loading...
[cont-env    ] container environment variables initialized.
[cont-secrets] loading container secrets...
[cont-secrets] container secrets loaded.
[cont-init   ] executing container initialization scripts...
[cont-init   ] 10-certs.sh: executing...
[cont-init   ] 10-certs.sh: mkdir: cannot create directory ‘/var/run/certsmonitor’: Permission denied
[cont-init   ] 10-certs.sh: terminated with error 1.

Container inspect

No response

Anything else?

l

Betonhaus commented 4 months ago

I fixed it. I missed some key documentation and assumed some environment variables were the same for every container

  handbrake:
    image: jlesage/handbrake
    container_name: handbrake
    ports:
      - 5805:5800
    volumes:
      - /mnt/docker/handbrake:/config:rw
      - /mnt/pool/media:/storage:ro
      - /mnt/wrk/downloads:/downloads:ro
      - /mnt/wrk/working/handbrake:/workdir:rw
#      - /home/user/HandBrake/watch:/watch:rw
      - /mnt/pool/import:/output:rw
    environment:
      - USER_ID=1000
      - GROUP_ID=1002
      - SUP_GROUP_IDS=993 #rendering group
      - UMASK=002
      - TZ=America/Edmonton
      - WEB_AUTHENTICATION=1
      - SECURE_CONNECTION=1
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
    networks:
      - dockerbridge
    restart: unless -stopped