Volumes and directories in docker-compose.yml

New at this, so sorry if it is a simple stupid question of me.
In the volumes section of docker-compose.yml I have a question?

- /path/to/bazarr/config:/config
- /path/to/movies:/movies #optional
- /path/to/tv:/tv #optional

How to define the path? I can redirect to the current directy, like this…

- /path/to/bazarr/config:./config
- /path/to/movies:./movies #optional
- /path/to/tv:./tv #optional

But what to do with the path to ?
Is that defined in the image that gets pulled, and I do nothing?
Or do I have to do something with path to on my localhost?

I think you have them backwards, the first path is on your host, the second is in the container.

So if you have your config directory at /home/myuser/docker/somecontainer/config you’d have this in your docker-compose.yml:

    - /home/myuser/docker/somecontainer/config:/config

This mounts the host directory into the container at /config.

Thank you very much. I will try that and share my experience here once I have tested.

But what about? (domoticz)

- path to device:path to device

How do I know, whats in the container?

And what about? (emby)

- /opt/vc/lib:/opt/vc/lib #optional

- /dev/dri:/dev/dri #optional
- /dev/vchiq:/dev/vchiq #optional
- /dev/video10:/dev/video10 #optional
- /dev/video11:/dev/video11 #optional
- /dev/video12:/dev/video12 #optional

I can’t help with that, sorry. I only use volumes in my setup.

It is always the same in mounting volumes and devices:

or easier:

The devices in your example enable the container to use the devices ond your machine. For example /dev/video10 is used for V4L2, which enables the container to connected use usb-webcams or tv-tuners.

the container path is almost always defined by the image creator. so you should always use this part as mentioned in the image documentation. your local path is what you have to manage yourself.