For the purpose of this how to we will use the Linuxserver.io Plex image.
The above docker-compose.yml requires you to fill in the UID and GID for the Plex user Plex will run as. Typically this is 1000 and 1000 respectively if your the first user created on Ubuntu or Raspberry Pi OS.
You will need to edit the file to specify the path to your TV shows and Movies. Defaults to the users home directory of $HOME/docker/plex.
You will need to get a Plex claim token at https://www.plex.tv/claim if you are running headless.
docker-compose up -d