87 lines
3.0 KiB
Plaintext
87 lines
3.0 KiB
Plaintext
|
FROM docker.io/lsiobase/ubuntu:focal
|
||
|
|
||
|
ARG VERSION="2.00.19"
|
||
|
ARG MODULE="Tdarr_Server"
|
||
|
|
||
|
ENV \
|
||
|
LIBVA_DRIVERS_PATH="/usr/lib/x86_64-linux-gnu/dri" \
|
||
|
LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu" \
|
||
|
NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" \
|
||
|
NVIDIA_VISIBLE_DEVICES="all" \
|
||
|
HANDBRAKE=1.5.1
|
||
|
|
||
|
ENV WEB_UI_PORT="8265" SERVER_PORT="8266" NODE_PORT="8267" PUID="1000" PGID="1000" UMASK="002" TZ="Etc/UTC" HOME="/home/Tdarr"
|
||
|
|
||
|
COPY root/ /
|
||
|
|
||
|
# handle deps
|
||
|
RUN apt-get update && \
|
||
|
apt-get install -y \
|
||
|
software-properties-common \
|
||
|
git \
|
||
|
trash-cli && \
|
||
|
mkdir -p \
|
||
|
/app \
|
||
|
/logs \
|
||
|
/temp \
|
||
|
"${HOME}" && \
|
||
|
useradd -u ${PUID} -U -d ${HOME} -s /bin/false Tdarr && \
|
||
|
usermod -G users Tdarr && \
|
||
|
|
||
|
apt-get update && apt-get install -y curl unzip mkvtoolnix libtesseract-dev && \
|
||
|
if uname -m | grep -q x86; then \
|
||
|
# FFmpeg
|
||
|
apt install -y wget && \
|
||
|
wget https://repo.jellyfin.org/releases/server/ubuntu/versions/jellyfin-ffmpeg/5.1.2-4/jellyfin-ffmpeg5_5.1.2-4-focal_amd64.deb && \
|
||
|
apt install -y \
|
||
|
./jellyfin-ffmpeg5_5.1.2-4-focal_amd64.deb && \
|
||
|
ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/local/bin/ffmpeg && \
|
||
|
ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/local/bin/tdarr-ffmpeg && \
|
||
|
|
||
|
# Intel deps
|
||
|
curl -s https://repositories.intel.com/graphics/intel-graphics.key | apt-key add - && \
|
||
|
echo 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main' > /etc/apt/sources.list.d/intel-graphics.list && \
|
||
|
apt-get update && \
|
||
|
apt-get install -y --no-install-recommends \
|
||
|
intel-media-va-driver-non-free \
|
||
|
vainfo \
|
||
|
mesa-va-drivers; \
|
||
|
fi
|
||
|
|
||
|
# former handbrake stuff
|
||
|
|
||
|
# other architectures
|
||
|
|
||
|
# handle tdarr binaries
|
||
|
RUN if [ "$MODULE" = "Tdarr_Node" ]; then \
|
||
|
echo removing /tdarr_server && \
|
||
|
rm -rdf /etc/services.d/tdarr_server ; \
|
||
|
fi && \
|
||
|
|
||
|
apt-get update && apt-get install -y curl unzip mkvtoolnix libtesseract-dev && \
|
||
|
if uname -m | grep -q x86; then \
|
||
|
curl --connect-timeout 120 --retry 5 -o /tmp/$MODULE.zip -L \
|
||
|
"https://tdarrs.s3.us-west-000.backblazeb2.com/versions/$VERSION/linux_x64/$MODULE.zip" && \
|
||
|
unzip -q /tmp/$MODULE.zip -d /app/$MODULE -x *.exe && \
|
||
|
|
||
|
if [ "$MODULE" = "Tdarr_Server" ]; then \
|
||
|
curl --connect-timeout 120 --retry 5 -o /tmp/Tdarr_Node.zip -L \
|
||
|
"https://tdarrs.s3.us-west-000.backblazeb2.com/versions/$VERSION/linux_x64/Tdarr_Node.zip" && \
|
||
|
unzip -q /tmp/Tdarr_Node.zip -d /app/Tdarr_Node -x *.exe ; \
|
||
|
fi ; \
|
||
|
fi && \
|
||
|
# other architectures
|
||
|
|
||
|
rm -rdf /tmp/$MODULE.zip && \
|
||
|
rm -rdf /tmp/Tdarr_Node.zip && \
|
||
|
trash-empty && \
|
||
|
apt-get autoremove -y
|
||
|
|
||
|
# link jellyfin-ffmpeg version 5.1.2 to tdarr node ffmpeg
|
||
|
RUN ln -sf /usr/local/bin/ffmpeg /app/Tdarr_Node/node_modules/ffmpeg-static/ffmpeg
|
||
|
|
||
|
EXPOSE ${NODE_PORT}
|
||
|
EXPOSE ${WEB_UI_PORT}
|
||
|
EXPOSE ${SERVER_PORT}
|
||
|
ENTRYPOINT ["/init"]
|