├── .dockerignore ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── Dockerfile ├── README.md └── root ├── defaults └── plexmediaserver └── etc ├── cont-init.d ├── 30-dbus └── 40-chown-files └── services.d ├── avahi └── run ├── dbus └── run └── plex └── run /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | .gitignore 3 | .github 4 | .gitattributes 5 | READMETEMPLATE.md 6 | README.md 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [linuxserverurl]: https://linuxserver.io 4 | [![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl] 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | ## Thanks, team linuxserver.io 21 | 22 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [linuxserverurl]: https://linuxserver.io 4 | [![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl] 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | ## Thanks, team linuxserver.io 15 | 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM lsiobase/ubuntu.armhf:bionic 2 | 3 | # set version label 4 | ARG BUILD_DATE 5 | ARG VERSION 6 | LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" 7 | LABEL maintainer="sparklballs" 8 | 9 | # environment settings 10 | ARG DEBIAN_FRONTEND="noninteractive" 11 | ENV HOME="/config" 12 | 13 | RUN \ 14 | echo "**** install gnupg and apt-transport-https packages ****" && \ 15 | apt-get update && \ 16 | apt-get install -y \ 17 | apt-transport-https \ 18 | gnupg && \ 19 | echo "**** add dev2day repository ****" && \ 20 | curl -o - https://dev2day.de/pms/dev2day-pms.gpg.key | apt-key add - && \ 21 | echo "deb https://dev2day.de/pms/ stretch main" >> /etc/apt/sources.list.d/plex.list && \ 22 | echo "**** install runtime packages ****" && \ 23 | apt-get update && \ 24 | apt-get install -y \ 25 | avahi-daemon \ 26 | dbus \ 27 | plexmediaserver-installer \ 28 | udev \ 29 | unrar \ 30 | wget && \ 31 | echo "**** cleanup ****" && \ 32 | rm -rf \ 33 | /tmp/* \ 34 | /var/lib/apt/lists/* \ 35 | /var/tmp/* 36 | 37 | # copy local files 38 | COPY root/ / 39 | 40 | # ports and volumes 41 | EXPOSE 32400 32400/udp 32469 32469/udp 5353/udp 1900/udp 42 | VOLUME /config /transcode 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [linuxserverurl]: https://linuxserver.io 2 | [forumurl]: https://forum.linuxserver.io 3 | [ircurl]: https://www.linuxserver.io/irc/ 4 | [podcasturl]: https://www.linuxserver.io/podcast/ 5 | [appurl]: https://plex.tv 6 | [hub]: https://hub.docker.com/r/lsioarmhf/plex/ 7 | 8 | [![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl] 9 | 10 | The [LinuxServer.io][linuxserverurl] team brings you another container release featuring easy user mapping and community support. Find us for support at: 11 | * [forum.linuxserver.io][forumurl] 12 | * [IRC][ircurl] on freenode at `#linuxserver.io` 13 | * [Podcast][podcasturl] covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation! 14 | 15 | # lsioarmhf/plex 16 | [![](https://images.microbadger.com/badges/version/lsioarmhf/plex.svg)](https://microbadger.com/images/lsioarmhf/plex "Get your own version badge on microbadger.com")[![](https://images.microbadger.com/badges/image/lsioarmhf/plex.svg)](https://microbadger.com/images/lsioarmhf/plex "Get your own image badge on microbadger.com")[![Docker Pulls](https://img.shields.io/docker/pulls/lsioarmhf/plex.svg)][hub][![Docker Stars](https://img.shields.io/docker/stars/lsioarmhf/plex.svg)][hub][![Build Status](https://ci.linuxserver.io/buildStatus/icon?job=Docker-Builders/armhf/armhf-plex)](https://ci.linuxserver.io/job/Docker-Builders/job/armhf/job/armhf-plex/) 17 | 18 | [Plex](https://plex.tv/) organizes video, music and photos from personal media libraries and streams them to smart TVs, streaming boxes and mobile devices. This container is packaged as a standalone Plex Media Server. 19 | 20 | [![plex](http://the-gadgeteer.com/wp-content/uploads/2015/10/plex-logo-e1446990678679.png)][appurl] 21 | 22 | ## Usage 23 | 24 | ``` 25 | docker create \ 26 | --name=plex \ 27 | --net=host \ 28 | -e PUID= -e PGID= \ 29 | -v :/config \ 30 | -v :/data/tvshows \ 31 | -v :/data/movies \ 32 | -v :/transcode \ 33 | lsioarmhf/plex 34 | ``` 35 | 36 | ## Parameters 37 | 38 | `The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side. 39 | For example with a port -p external:internal - what this shows is the port mapping from internal to external of the container. 40 | So -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 41 | http://192.168.x.x:8080 would show you what's running INSIDE the container on port 80.` 42 | 43 | 44 | * `--net=host` - Shares host networking with container, **required**. 45 | * `-v /config` - Plex library location. *This can grow very large.* 46 | * `-v /data/xyz` - Media goes here. Add as many as needed e.g. `/data/movies`, `/data/tv`, etc. 47 | * `-v /transcode` - Path for transcoding folder, *optional*. 48 | * `-e PGID=` for for GroupID - see below for explanation 49 | * `-e PUID=` for for UserID - see below for explanation 50 | 51 | It is based on ubuntu xenial with s6 overlay, for shell access whilst the container is running do `docker exec -it plex /bin/bash`. 52 | 53 | ### User / Group Identifiers 54 | 55 | Sometimes when using data 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`. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" TM. 56 | 57 | In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as below: 58 | 59 | ``` 60 | $ id 61 | uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup) 62 | ``` 63 | 64 | ## Setting up the application 65 | `IMPORTANT... THIS IS THE ARMHF VERSION` 66 | 67 | Webui can be found at `:32400/web` 68 | 69 | 70 | ## Info 71 | 72 | * Shell access whilst the container is running: `docker exec -it plex /bin/bash` 73 | * To monitor the logs of the container in realtime: `docker logs -f plex` 74 | 75 | * container version number 76 | 77 | `docker inspect -f '{{ index .Config.Labels "build_version" }}' plex` 78 | 79 | * image version number 80 | 81 | `docker inspect -f '{{ index .Config.Labels "build_version" }}' lsioarmhf/plex` 82 | 83 | ## Versions 84 | 85 | + **07.09.18:** Rebase to ubuntu bionic and tidy Dockerfile. 86 | + **06.01.18:** Fix continuation lines. 87 | + **28.06.17:** Add udev and unrar packages. 88 | + **14.10.16:** Add version layer information. 89 | + **22.09.16:** Initial Release. 90 | -------------------------------------------------------------------------------- /root/defaults/plexmediaserver: -------------------------------------------------------------------------------- 1 | # default script for Plex Media Server 2 | 3 | # the number of plugins that can run at the same time 4 | PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6 5 | 6 | # ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE 7 | PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000 8 | 9 | # uncomment to set it to something else 10 | PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" 11 | 12 | # the user that PMS should run as, defaults to 'plex' 13 | # note that if you change this you might need to move 14 | # the Application Support directory to not lose your 15 | # media library 16 | PLEX_MEDIA_SERVER_USER=abc 17 | -------------------------------------------------------------------------------- /root/etc/cont-init.d/30-dbus: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | # make folders 4 | mkdir -p \ 5 | /var/run/dbus 6 | 7 | # delete existing pid if found 8 | [[ -e /var/run/dbus/pid ]] && \ 9 | rm -f /var/run/dbus/pid 10 | 11 | # permissions 12 | chown messagebus:messagebus \ 13 | /var/run/dbus 14 | dbus-uuidgen --ensure 15 | sleep 1 16 | -------------------------------------------------------------------------------- /root/etc/cont-init.d/40-chown-files: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | # check for Library existence and permissions 4 | if [ ! -d "/config/Library" ]; then 5 | mkdir -p /config/Library 6 | chown abc:abc /config/Library 7 | elif [ ! "$(stat -c %u /config/Library)" = "$PUID" ]; then 8 | echo "Change in ownership detected, please be patient while we chown existing files" 9 | echo "This could take some time" 10 | chown abc:abc -R \ 11 | /config/Library 12 | fi 13 | -------------------------------------------------------------------------------- /root/etc/services.d/avahi/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | 3 | until [[ -e /var/run/dbus/system_bus_socket ]]; do 4 | sleep 1s 5 | done 6 | 7 | exec \ 8 | avahi-daemon --no-chroot 9 | -------------------------------------------------------------------------------- /root/etc/services.d/dbus/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | exec \ 3 | dbus-daemon --system --nofork 4 | -------------------------------------------------------------------------------- /root/etc/services.d/plex/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bash 2 | exec \ 3 | s6-setuidgid abc /usr/sbin/start_pms 4 | --------------------------------------------------------------------------------