linuxserver / docker-plex

GNU General Public License v3.0
1.19k stars 210 forks source link

Plex won't start if config folder includes a symlinked file #369

Closed strass closed 11 months ago

strass commented 1 year ago

Is there an existing issue for this?

Current Behavior

I co-locate my docker-compose file alongside the /config file in the plex image (/opt/config/plex:/config:rw). For organizational purposes I've recently started symlinking my source of truth from a git repository into the config directory so that changes are propagated automatically.

Since doing that I have begun seeing this error on container startup:

plex  | chown: cannot dereference '/config/docker-compose.yml': No such file or directory
plex  | s6-rc: warning: unable to start service init-plex-chown: command exited 1

Expected Behavior

I would expect that the chown script can deal with symlinked files and won't prevent plex startup.

Steps To Reproduce

Bind the /config folder in the container to a directory in your host that contains your docker-compose file Symlink the docker-compose file in from another directory Start container

Environment

- OS: flatcar stable
- How docker service was installed: flatcar defaults

CPU architecture

x86-64

Docker creation

---
version: "3"
services:
  plex:
    container_name: "plex"
    entrypoint:
      - "/init"
    environment:
      - "PUID=1000"
      - "PGID=1000"
      - "VERSION=docker"
      - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      - "HOME=/root"
      - "LANGUAGE=en_US.UTF-8"
      - "LANG=en_US.UTF-8"
      - "TERM=xterm"
      - "NVIDIA_VISIBLE_DEVICES=all"
      - "NVIDIA_DRIVER_CAPABILITIES=compute,video,utility"
      - "DEBIAN_FRONTEND=noninteractive"
      - "PLEX_DOWNLOAD=https://downloads.plex.tv/plex-media-server-new"
      - "PLEX_ARCH=amd64"
      - "PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/config/Library/Application Support"
      - "PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver"
      - "PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6"
      - "PLEX_MEDIA_SERVER_USER=abc"
      - "PLEX_MEDIA_SERVER_INFO_VENDOR=Docker"
      - "PLEX_MEDIA_SERVER_INFO_DEVICE=Docker Container (LinuxServer.io)"
    image: "lscr.io/linuxserver/plex:latest"
    restart: "unless-stopped"
    volumes:
      - "/opt/config/plex:/config" # !!! this one
      - "/mnt/storage/video/tv:/tv"
    network_mode: host

Container logs

plex  | ───────────────────────────────────────
plex  |
plex  |
plex  |       ██╗     ███████╗██╗ ██████╗
plex  |       ██║     ██╔════╝██║██╔═══██╗
plex  |       ██║     ███████╗██║██║   ██║
plex  |       ██║     ╚════██║██║██║   ██║
plex  |       ███████╗███████║██║╚██████╔╝
plex  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
plex  |
plex  |
plex  |    Brought to you by linuxserver.io
plex  | ───────────────────────────────────────
plex  |
plex  |
plex  | To support LSIO projects visit:
plex  | https://www.linuxserver.io/donate/
plex  |
plex  |
plex  | ───────────────────────────────────────
plex  | GID/UID
plex  | ───────────────────────────────────────
plex  |
plex  |
plex  | User UID:    1000
plex  | User GID:    1000
plex  | ───────────────────────────────────────
plex  |
plex  |
plex  | chown: cannot dereference '/config/docker-compose.yml': No such file or directory
plex  | s6-rc: warning: unable to start service init-plex-chown: command exited 1
plex  | [migrations] started
plex  | [migrations] no migrations found
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

LinuxServer-CI commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

strass commented 1 year ago

bump

aptalca commented 1 year ago

I'll be honest, this would be a very low priority for us as we already have a sizeable backlog.

The config folder is meant to hold container files in a persistent manner. It's not meant for storing non-container or user files. Definitely not meant for storing symlinks that point to files that are not mounted/accessible inside the container. Therefore this is an extreme edge case.

LinuxServer-CI commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 10 months ago

This issue is locked due to inactivity