Docker version: How to add multiple data sources

I’m using the official Docker container of PMS and I’ve media stored across different drives. Unfortunately, I can’t find a way to add multiple data sources.

The Docker documentation reads:

-v <path/to/media>:/data

This is provided as examples for providing media into the container. The exact structure of how the media is organized and presented inside the container is a matter of user preference. You can use as many or as few of these parameters as required to provide your media to the container.

When I add multiple :/data parameters in my compose file, the source picker interface in Plex only shows me the last entry. Or the “music” folder in this example:

  - /srv/dev-disk-by-uuid-7f281e78-cec0-4bf2-a4b9-6d9003ebcb4e/video1:/data
  - /srv/dev-disk-by-uuid-0af18657-e0fa-43e7-9aab-a11591861912/video2:/data
  - /srv/dev-disk-by-uuid-f416f45c-9634-4d2b-9f1b-0b9b5b315bc5/music:/data

The part after the : is the target directory inside the container to which you’re mapping the external data source. You can’t map multiple source paths as the exact same mount point / target directory.

Looks like using compose? An example from one of mine

notice the map to locations all have different names, yours are overlapping, I’m surprised docker build didn’t crap out on you.

Plex only shows me the last entry.

because they are overwriting

You can’t map multiple volumes to the same location, it doesn’t work like that. You need to map each to a unique mount point.

- /srv/dev-disk-by-uuid-7f281e78-cec0-4bf2-a4b9-6d9003ebcb4e/video1:/data/video1
- /srv/dev-disk-by-uuid-0af18657-e0fa-43e7-9aab-a11591861912/video2:/data/video2
- /srv/dev-disk-by-uuid-f416f45c-9634-4d2b-9f1b-0b9b5b315bc5/music:/data/music

Ok, got it. I thought all the source folders provided in the compose file would just be mounted inside of the same /data folder. So I basically have to point each volume entry to a different location like /data1, /data2, /data3, and so on.

You could try this:

- /srv:/data

Then in Plex, browse into data and select a disk and the folder you want to add to a Library. Repeat as needed.

Correct.

Note that while Plex recommends using /data you can set it to anything provided it doesn’t correspond to another directory in the container that is being used for something (e.g if you set it to /etc that would break things).