diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e1dd93e..2e7da93 100755 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -96,7 +96,7 @@ If you are proposing additional packages to be added, ensure that you added the ### Testing your changes -``` +```bash git clone https://github.com/linuxserver/docker-plex.git cd docker-plex docker build \ @@ -106,13 +106,14 @@ docker build \ ``` The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static` -``` + +```bash docker run --rm --privileged multiarch/qemu-user-static:register --reset ``` Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`. -## Update the chagelog +## Update the changelog If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-plex/tree/master/root), add an entry to the changelog diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index b8fddcc..2a84271 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -18,7 +18,7 @@ jobs: fi echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_PLEX_MASTER\". ****" echo "**** Retrieving external version ****" - EXT_RELEASE=$(curl -s "https://plex.tv/api/downloads/5.json" | jq -r ". | .computer.Linux.version") + EXT_RELEASE=$(curl -s "https://plex.tv/api/downloads/5.json" | jq -r '. | .computer.Linux.version') if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then echo "**** Can't retrieve external version, exiting ****" FAILURE_REASON="Can't retrieve external version for plex branch master" diff --git a/README.md b/README.md index 6b31366..995e39e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ - + [![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io) @@ -12,13 +12,14 @@ The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring: - * regular and timely application updates - * easy user mappings (PGID, PUID) - * custom base image with s6 overlay - * weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth - * regular security updates +* regular and timely application updates +* easy user mappings (PGID, PUID) +* custom base image with s6 overlay +* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth +* regular security updates Find us at: + * [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more! * [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team. * [Discourse](https://discourse.linuxserver.io) - post on our community forum. @@ -65,6 +66,41 @@ This image provides various versions that are available via tags. `latest` tag u | latest | Stable releases with Focal baseimage | | bionic | Stable releases with Bionic baseimage | +## Application Setup + +Webui can be found at `:32400/web` + +** Note about updates, if there is no value set for the VERSION variable, then no updates will take place.** + +** For new users, no updates will take place on the first run of the container as there is no preferences file to read your token from, to update restart the Docker container after logging in through the webui** + +Valid settings for VERSION are:- + +`IMPORTANT NOTE:- YOU CANNOT UPDATE TO A PLEXPASS ONLY (BETA) VERSION IF YOU ARE NOT LOGGED IN WITH A PLEXPASS ACCOUNT` + ++ **`docker`**: Let Docker handle the Plex Version, we keep our Dockerhub Endpoint up to date with the latest public builds. This is the same as leaving this setting out of your create command. ++ **`latest`**: will update plex to the latest version available that you are entitled to. ++ **`public`**: will update plexpass users to the latest public version, useful for plexpass users that don't want to be on the bleeding edge but still want the latest public updates. ++ **``**: will select a specific version (eg 0.9.12.4.1192-9a47d21) of plex to install, note you cannot use this to access plexpass versions if you do not have plexpass. + +## Hardware Acceleration + +### Intel + +Hardware acceleration users for Intel Quicksync will need to mount their /dev/dri video device inside of the container by passing the following command when running or creating the container: + +```--device=/dev/dri:/dev/dri``` + +We will automatically ensure the abc user inside of the container has the proper permissions to access this device. + +### Nvidia + +Hardware acceleration users for Nvidia will need to install the container runtime provided by Nvidia on their host, instructions can be found here: + +https://github.com/NVIDIA/nvidia-docker + +We automatically add the necessary environment variable that will utilise all the features available on a GPU on the host. Once nvidia-docker is installed on your host you will need to re/create the docker container with the nvidia container runtime `--runtime=nvidia` and add an environment variable `-e NVIDIA_VISIBLE_DEVICES=all` (can also be set to a specific gpu's UUID, this can be discovered by running `nvidia-smi --query-gpu=gpu_name,gpu_uuid --format=csv` ). NVIDIA automatically mounts the GPU and drivers from your host into the plex docker. + ## Usage Here are some example snippets to help you get started creating a container. @@ -95,7 +131,7 @@ services: ### docker cli -``` +```bash docker run -d \ --name=plex \ --net=host \ @@ -110,7 +146,6 @@ docker run -d \ ghcr.io/linuxserver/plex ``` - ## Parameters Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `:` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container. @@ -132,7 +167,7 @@ You can set any environment variable from a file by using a special prepend `FIL As an example: -``` +```bash -e FILE__PASSWORD=/run/secrets/mysecretpassword ``` @@ -171,7 +206,6 @@ The application accepts a series of environment variables to further customize i | `--device=/dev/dri:/dev/dri` | Add this option to your run command if you plan on using Quicksync hardware acceleration - see Application Setup section.| | `--device=/dev/dvb:/dev/dvb` | Add this option to your run command if you plan on using dvb devices.| - ## User / Group Identifiers When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`. @@ -180,55 +214,17 @@ Ensure any volume directories on the host are owned by the same user you specify In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below: -``` +```bash $ id username uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup) ``` - -  -## Application Setup - -Webui can be found at `:32400/web` - -** Note about updates, if there is no value set for the VERSION variable, then no updates will take place.** - -** For new users, no updates will take place on the first run of the container as there is no preferences file to read your token from, to update restart the Docker container after logging in through the webui** - -Valid settings for VERSION are:- - -`IMPORTANT NOTE:- YOU CANNOT UPDATE TO A PLEXPASS ONLY (BETA) VERSION IF YOU ARE NOT LOGGED IN WITH A PLEXPASS ACCOUNT` - -+ **`docker`**: Let Docker handle the Plex Version, we keep our Dockerhub Endpoint up to date with the latest public builds. This is the same as leaving this setting out of your create command. -+ **`latest`**: will update plex to the latest version available that you are entitled to. -+ **`public`**: will update plexpass users to the latest public version, useful for plexpass users that don't want to be on the bleeding edge but still want the latest public updates. -+ **``**: will select a specific version (eg 0.9.12.4.1192-9a47d21) of plex to install, note you cannot use this to access plexpass versions if you do not have plexpass. - -## Hardware Acceleration - -### Intel - -Hardware acceleration users for Intel Quicksync will need to mount their /dev/dri video device inside of the container by passing the following command when running or creating the container: - -```--device=/dev/dri:/dev/dri``` - -We will automatically ensure the abc user inside of the container has the proper permissions to access this device. - -### Nvidia - -Hardware acceleration users for Nvidia will need to install the container runtime provided by Nvidia on their host, instructions can be found here: - -https://github.com/NVIDIA/nvidia-docker - -We automatically add the necessary environment variable that will utilise all the features available on a GPU on the host. Once nvidia-docker is installed on your host you will need to re/create the docker container with the nvidia container runtime `--runtime=nvidia` and add an environment variable `-e NVIDIA_VISIBLE_DEVICES=all` (can also be set to a specific gpu's UUID, this can be discovered by running `nvidia-smi --query-gpu=gpu_name,gpu_uuid --format=csv` ). NVIDIA automatically mounts the GPU and drivers from your host into the plex docker. - - ## Docker Mods + [![Docker Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=plex&query=%24.mods%5B%27plex%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=plex "view available mods for this container.") [![Docker Universal Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=universal&query=%24.mods%5B%27universal%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=universal "view available universal mods.") We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above. - ## Support Info * Shell access whilst the container is running: `docker exec -it plex /bin/bash` @@ -245,6 +241,7 @@ Most of our images are static, versioned, and require an image update and contai Below are the instructions for updating containers: ### Via Docker Compose + * Update all images: `docker-compose pull` * or update a single image: `docker-compose pull plex` * Let compose update all containers as necessary: `docker-compose up -d` @@ -252,6 +249,7 @@ Below are the instructions for updating containers: * You can also remove the old dangling images: `docker image prune` ### Via Docker Run + * Update the image: `docker pull ghcr.io/linuxserver/plex` * Stop the running container: `docker stop plex` * Delete the container: `docker rm plex` @@ -259,24 +257,29 @@ Below are the instructions for updating containers: * You can also remove the old dangling images: `docker image prune` ### Via Watchtower auto-updater (only use if you don't remember the original parameters) + * Pull the latest image at its tag and replace it with the same env variables in one run: - ``` + + ```bash docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ containrrr/watchtower \ --run-once plex ``` + * You can also remove the old dangling images: `docker image prune` **Note:** We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using [Docker Compose](https://docs.linuxserver.io/general/docker-compose). ### Image Update Notifications - Diun (Docker Image Update Notifier) + * We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported. ## Building locally If you want to make local modifications to these images for development purposes or just to customize the logic: -``` + +```bash git clone https://github.com/linuxserver/docker-plex.git cd docker-plex docker build \ @@ -286,7 +289,8 @@ docker build \ ``` The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static` -``` + +```bash docker run --rm --privileged multiarch/qemu-user-static:register --reset ```