jellyfin-packaging/portable/Dockerfile

76 lines
1.8 KiB
Docker
Raw Normal View History

2024-02-11 19:21:47 +00:00
# Docker build arguments
ARG DOTNET_VERSION=8.0
ARG NODEJS_VERSION=20
2024-02-15 06:23:51 +00:00
ARG PACKAGE_TYPE=debian
ARG PACKAGE_VERSION=12
2024-02-11 19:21:47 +00:00
2024-02-15 06:23:51 +00:00
FROM ${PACKAGE_TYPE}:${PACKAGE_VERSION}
2024-02-11 19:21:47 +00:00
ARG SOURCE_DIR=/jellyfin
ARG ARTIFACT_DIR=/dist
ARG DOTNET_VERSION
ARG NODEJS_VERSION
2024-02-15 06:23:51 +00:00
ARG PACKAGE_TYPE
ARG PACKAGE_VERSION
2024-02-11 19:21:47 +00:00
# Docker run environment
ENV SOURCE_DIR=/jellyfin
ENV ARTIFACT_DIR=/dist
2024-02-15 06:23:51 +00:00
ENV TYPE=${PACKAGE_TYPE}
ENV VERSION=${PACKAGE_VERSION}
ENV ARCHIVE_TYPES=targz
2024-02-11 19:21:47 +00:00
# Prepare Debian build environment
RUN apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \
apt-get install --no-install-recommends -y \
2024-02-23 17:24:32 +00:00
wget \
2024-05-07 14:47:11 +00:00
unzip \
2024-09-18 20:50:44 +00:00
git \
2024-02-23 17:24:32 +00:00
debhelper \
gnupg \
devscripts \
build-essential \
mmv \
lsb-release\
zip \
libssl*.* \
liblttng-ust*\
libssl-dev \
libfontconfig*-dev \
libcurl*openssl-dev \
libfreetype*-dev \
&& apt-get clean autoclean -y \
&& apt-get autoremove -y \
&& rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
2024-02-11 19:21:47 +00:00
# Prepare dotnet SDK
2024-02-15 06:23:51 +00:00
RUN wget https://packages.microsoft.com/config/${PACKAGE_TYPE}/${PACKAGE_VERSION}/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
2024-02-11 19:21:47 +00:00
&& dpkg -i packages-microsoft-prod.deb \
&& apt-get -f install \
&& apt-get update \
&& apt-get install -y dotnet-sdk-${DOTNET_VERSION}
# Prepare nodejs
RUN wget https://deb.nodesource.com/setup_${NODEJS_VERSION}.x -O nodejs-install.sh \
&& chmod +x ./nodejs-install.sh \
&& ./nodejs-install.sh \
&& apt-get install -y \
nodejs
# Clean up dependencies
RUN apt-get remove wget -y \
&& apt-get clean autoclean -y \
&& apt-get autoremove -y \
&& rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
2024-02-11 19:21:47 +00:00
# Link to build script
RUN ln -sf ${SOURCE_DIR}/portable/build.sh /build.sh
VOLUME ${SOURCE_DIR}/
VOLUME ${ARTIFACT_DIR}/
ENTRYPOINT ["/build.sh"]