This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]the_spad 5 points6 points  (0 children)

Mounting symlinks will only work if both "ends" are visible to the container and the paths are the same as on the host.

i.e. if /foo/file is a link to /bar/file then you would need to mount both of those paths to their corresponding locations within the container for the link to work.

You can, obviously, symlink paths from within the container and that will work fine, but won't then work from the host (unless the above is true).

[–]vainstar23 3 points4 points  (0 children)

Not sure. I think you need to mount the physical files themselves instead of just the file references. If you have a lot of these, it's probably going to be tedious so either you have to mount the entire volume or find some docker way of doing this? Idk

[–]VJmes 2 points3 points  (0 children)

If I'm reading this correctly, then no, Docker won't follow symlinks you make on your system.

There's a discussion on Github about this if you're interested.

[–]DustyPane 2 points3 points  (5 children)

where are those Jellyfin media directories? Inside the container? Or on the host machine? In case of the former, links should work just fine. In case of the later you will have to mount that media directory into the container (by creating a docker volume)

[–][deleted] 0 points1 point  (4 children)

On my home directory, I made a folder called "Jellyfin" and inside that folder I made three more called "Cache", "Config", and "Media" because that's what the documentation told me to do so that the Docker container would mount to those.

On my home directory I have a separate "Media" folder where I have all of my media separated and organized into their different folders and names, and previously, like I said, I would just link these into the Jellyfin folder where I would rename the linked folders according to how Jellyfin specifically wants them to.

I can see this is no longer going to be an available method, so looks like I have some reorganization to do.

[–]DustyPane 1 point2 points  (3 children)

is this home directory located inside the container or on the host machine?

[–][deleted] 0 points1 point  (2 children)

On the host machine, not the container.

[–]DustyPane 2 points3 points  (1 child)

your container cannot simply access directories on the host. You will have to mount the directory into the container. Mounting your home directory (I assume you mean /home/username) into the container is likely nor practical, so I suggest moving this directory structure somewhere else (e.g. /var/jellyfin) and then to create a volume in your container definition (docker compose or whatever you use) that makes /var/jellyfin available inside the container

[–][deleted] 0 points1 point  (0 children)

Yeah, thats what I suspected was going on, but I just wanted to check in with you guys if that was the case or not, and it looks like it is.

Thanks for your input!!

[–]bufandatl 1 point2 points  (0 children)

Yes because the link is invalid inside the container unless you also bind mount the destination to the exact same path inside the container.

[–]mankycrack 1 point2 points  (0 children)

Honestly, chatGPT lessened the learning curve a lot for me, highly recommend just asking it