aboutsummaryrefslogtreecommitdiff
path: root/portable/Dockerfile
blob: 73856f129e128a5792068571eec8b98b6eb79167 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Docker build arguments
ARG DOTNET_VERSION=8.0
ARG NODEJS_VERSION=20

ARG PACKAGE_TYPE=debian
ARG PACKAGE_VERSION=12

FROM ${PACKAGE_TYPE}:${PACKAGE_VERSION}

ARG SOURCE_DIR=/jellyfin
ARG ARTIFACT_DIR=/dist
ARG DOTNET_VERSION
ARG NODEJS_VERSION
ARG PACKAGE_TYPE
ARG PACKAGE_VERSION

# Docker run environment
ENV SOURCE_DIR=/jellyfin
ENV ARTIFACT_DIR=/dist
ENV TYPE=${PACKAGE_TYPE}
ENV VERSION=${PACKAGE_VERSION}
ENV ARCHIVE_TYPES=targz

# Prepare Debian build environment
RUN apt-get update -y \
 && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \
    apt-get install --no-install-recommends -y \
    wget debhelper gnupg devscripts build-essential mmv lsb-release zip \
    libssl*.* liblttng-ust* libssl-dev \
    libfontconfig*-dev libcurl*openssl-dev libfreetype*-dev

# Prepare dotnet SDK
RUN wget https://packages.microsoft.com/config/${PACKAGE_TYPE}/${PACKAGE_VERSION}/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
 && 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/*

# Link to build script
RUN ln -sf ${SOURCE_DIR}/portable/build.sh /build.sh

VOLUME ${SOURCE_DIR}/

VOLUME ${ARTIFACT_DIR}/

ENTRYPOINT ["/build.sh"]
bgstack15