docker-plex-wireguard/Dockerfile

70 lines
2.3 KiB
Text
Raw Permalink Normal View History

2020-11-23 10:16:41 -08:00
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
2015-05-10 10:50:00 +02:00
# set version label
ARG BUILD_DATE
ARG VERSION
ARG PLEX_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
2019-12-04 12:00:03 -05:00
LABEL maintainer="thelamer"
#Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
2016-06-30 22:59:35 +01:00
# global environment settings
ENV DEBIAN_FRONTEND="noninteractive" \
PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server-new" \
PLEX_ARCH="amd64" \
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \
PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \
2019-02-09 17:27:10 +00:00
PLEX_MEDIA_SERVER_USER="abc" \
PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
2015-05-10 10:50:00 +02:00
2016-06-30 22:59:35 +01:00
RUN \
echo "**** install runtime packages ****" && \
2016-06-30 22:59:35 +01:00
apt-get update && \
apt-get install -y \
2020-11-19 11:02:20 -08:00
beignet-opencl-icd \
2020-03-23 11:15:40 -04:00
jq \
2020-11-19 11:02:20 -08:00
ocl-icd-libopencl1 \
udev \
unrar \
2020-03-23 11:15:40 -04:00
wget && \
COMP_RT_RELEASE=$(curl -sX GET "https://api.github.com/repos/intel/compute-runtime/releases/latest" | jq -r '.tag_name') && \
COMP_RT_URLS=$(curl -sX GET "https://api.github.com/repos/intel/compute-runtime/releases/tags/${COMP_RT_RELEASE}" | jq -r '.body' | grep wget | sed 's|wget ||g') && \
mkdir -p /opencl-intel && \
for i in ${COMP_RT_URLS}; do \
i=$(echo ${i} | tr -d '\r'); \
echo "**** downloading ${i} ****"; \
curl -o "/opencl-intel/$(basename ${i})" \
-L "${i}"; \
done && \
dpkg -i /opencl-intel/*.deb && \
rm -rf /opencl-intel && \
2017-12-09 15:47:32 +00:00
echo "**** install plex ****" && \
if [ -z ${PLEX_RELEASE+x} ]; then \
PLEX_RELEASE=$(curl -sX GET 'https://plex.tv/api/downloads/5.json' \
| jq -r '.computer.Linux.version'); \
fi && \
2016-06-30 22:59:35 +01:00
curl -o \
/tmp/plexmediaserver.deb -L \
"${PLEX_DOWNLOAD}/${PLEX_RELEASE}/debian/plexmediaserver_${PLEX_RELEASE}_${PLEX_ARCH}.deb" && \
2016-06-30 22:59:35 +01:00
dpkg -i /tmp/plexmediaserver.deb && \
echo "**** ensure abc user's home folder is /app ****" && \
usermod -d /app abc && \
2017-12-09 15:47:32 +00:00
echo "**** cleanup ****" && \
2016-08-22 12:44:21 +01:00
apt-get clean && \
rm -rf \
/etc/default/plexmediaserver \
2016-08-22 12:44:21 +01:00
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
2016-06-30 22:59:35 +01:00
# add local files
COPY root/ /
# ports and volumes
EXPOSE 32400/tcp 1900/udp 3005/tcp 5353/udp 8324/tcp 32410/udp 32412/udp 32413/udp 32414/udp 32469/tcp
2019-12-04 12:54:10 -05:00
VOLUME /config