feat: updated Dockerfile and began adding CI/CD for build and deploy
Some checks are pending
Docker / build (push) Waiting to run
Some checks are pending
Docker / build (push) Waiting to run
This commit is contained in:
parent
4b2818ef5f
commit
a93051bae2
2 changed files with 92 additions and 24 deletions
58
Dockerfile
58
Dockerfile
|
@ -1,40 +1,23 @@
|
|||
FROM alpine:latest
|
||||
FROM alpine:latest AS build
|
||||
|
||||
# Install dependencies
|
||||
RUN apk --no-cache add -u -f \
|
||||
wget \
|
||||
curl \
|
||||
unzip \
|
||||
git \
|
||||
debhelper \
|
||||
gnupg \
|
||||
devscripts \
|
||||
build-essential \
|
||||
mmv \
|
||||
lsb-release \
|
||||
zip \
|
||||
libssl*.* \
|
||||
liblttng-ust*\
|
||||
libssl-dev \
|
||||
libfontconfig*-dev \
|
||||
libcurl*openssl-dev \
|
||||
libfreetype-dev \
|
||||
dotnet8-sdk \
|
||||
nodejs \
|
||||
npm \
|
||||
dotnet9-sdk \
|
||||
nodejs \
|
||||
npm \
|
||||
ffmpeg
|
||||
|
||||
# Fetch jellyfin and jellyfin-web
|
||||
|
||||
WORKDIR /home/root
|
||||
RUN git clone https://github.com/jellyfin/jellyfin.git
|
||||
RUN mv jellyfin jellyfin-server
|
||||
RUN git clone https://github.com/jellyfin/jellyfin-web.git
|
||||
|
||||
# Patch jellyfin-server
|
||||
|
||||
RUN sed -i '/^\s*NetworkChange\.Network/d' jellyfin-server/src/Jellyfin.Networking/Manager/NetworkManager.cs
|
||||
RUN dotnet publish jellyfin-server/Jellyfin.Server --configuration Release --self-contained --runtime linux-amd64 --output /home/root/dist/ -p:DebugSymbols=false -p:DebugType=none -p:UseAppHost=true
|
||||
RUN dotnet publish jellyfin-server/Jellyfin.Server --configuration Release --self-contained --runtime linux-musl-x64 --output /home/root/dist/jellyfin -p:DebugSymbols=false -p:DebugType=none -p:UseAppHost=true
|
||||
|
||||
# Build jellyfin-web
|
||||
WORKDIR /home/root/jellyfin-web
|
||||
|
@ -42,9 +25,36 @@ RUN npm ci --no-audit --unsafe-perm
|
|||
RUN npm run build:production
|
||||
|
||||
WORKDIR /home/root
|
||||
RUN mv /home/root/jellyfin-web/dist /home/root/dist/jellyfin/jellyfin-web
|
||||
RUN mv /home/root/dist/jellyfin /jellyfin
|
||||
RUN mv /home/root/jellyfin-web/dist /jellyfin/jellyfin-web
|
||||
|
||||
# Add minimal dependencies
|
||||
FROM alpine:latest AS runtime
|
||||
|
||||
ENTRYPOINT ["/home/root/dist/jellyfin/jellyfin"]
|
||||
RUN apk --no-cache add -u -f \
|
||||
ffmpeg \
|
||||
icu-libs \
|
||||
icu-data-full \
|
||||
libstdc++ \
|
||||
libstdc++6
|
||||
|
||||
# Add hardened_malloc
|
||||
COPY --from=ghcr.io/polarix-containers/hardened_malloc:latest /install /usr/local/lib/
|
||||
ENV LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"
|
||||
|
||||
# Default environment variables for the Jellyfin invocation
|
||||
ENV DEBIAN_FRONTEND="noninteractive" \
|
||||
LC_ALL="en_US.UTF-8" \
|
||||
LANG="en_US.UTF-8" \
|
||||
LANGUAGE="en_US:en" \
|
||||
JELLYFIN_DATA_DIR="/config" \
|
||||
JELLYFIN_CACHE_DIR="/cache" \
|
||||
JELLYFIN_CONFIG_DIR="/config/config" \
|
||||
JELLYFIN_LOG_DIR="/config/log" \
|
||||
JELLYFIN_WEB_DIR="/jellyfin/jellyfin-web" \
|
||||
JELLYFIN_FFMPEG="/usr/bin/ffmpeg"
|
||||
# JELLYFIN_FFMPEG="/usr/lib/jellyfin-ffmpeg/ffmpeg"
|
||||
COPY --from=build /jellyfin /jellyfin
|
||||
COPY --from=build /jellyfin/jellyfin-web /jellyfin/jellyfin-web
|
||||
|
||||
ENTRYPOINT ["/jellyfin/jellyfin"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue