aboutsummaryrefslogtreecommitdiff
path: root/rpm/docker/Dockerfile
blob: bfdd0859eb7c67078ba0d18daa87c51b062b21ac (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
# Docker build arguments
ARG DOTNET_VERSION=8.0
ARG NODEJS_VERSION=20
# No GCC version choices in Fedora, sorry

ARG PACKAGE_TYPE
ARG PACKAGE_VERSION
ARG PACKAGE_ARCH

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
ARG PACKAGE_ARCH
ARG GCC_VERSION

# Docker run environment
ENV SOURCE_DIR=/jellyfin
ENV ARTIFACT_DIR=/dist
#ENV DEB_BUILD_OPTIONS=noddebs
ENV TYPE=${PACKAGE_TYPE}
ENV VERSION=${PACKAGE_VERSION}
ENV ARCH=${PACKAGE_ARCH}

# Prepare Fedora build environment
# spec file is not available during image build, so `dnf builddep jellyfin.spec` will not work here.
RUN dnf install -y \
 firewalld-filesystem \
 systemd-rpm-macros \ 
 dotnet-sdk-${DOTNET_VERSION} \
 npm \
 nodejs \
 rpm-build \
 && dnf clean all

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

VOLUME ${SOURCE_DIR}/

VOLUME ${ARTIFACT_DIR}/

ENTRYPOINT ["/build.sh"]
bgstack15