Cleaned up Dockerfile
This commit is contained in:
parent
477e9bbd97
commit
4b2818ef5f
1 changed files with 11 additions and 24 deletions
35
Dockerfile
35
Dockerfile
|
@ -1,18 +1,6 @@
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
ARG DOTNET_VERSION=8.0
|
# Install dependencies
|
||||||
ARG NODEJS_VERSION=20
|
|
||||||
|
|
||||||
ARG SOURCE_DIR=/jellyfin
|
|
||||||
ARG ARTIFACT_DIR=/dist
|
|
||||||
ARG DOTNET_VERSION
|
|
||||||
ARG NODEJS_VERSION
|
|
||||||
|
|
||||||
ENV SOURCE_DIR=/jellyfin
|
|
||||||
ENV ARTIFAVT_DIR=/dist
|
|
||||||
ENV TYPE=$(PACKAGE_TYPE)
|
|
||||||
ENV ARCHIVE_TYPES=targz
|
|
||||||
|
|
||||||
RUN apk --no-cache add -u -f \
|
RUN apk --no-cache add -u -f \
|
||||||
wget \
|
wget \
|
||||||
curl \
|
curl \
|
||||||
|
@ -36,28 +24,27 @@ RUN apk --no-cache add -u -f \
|
||||||
npm \
|
npm \
|
||||||
ffmpeg
|
ffmpeg
|
||||||
|
|
||||||
|
# Fetch jellyfin and jellyfin-web
|
||||||
|
|
||||||
WORKDIR /home/root
|
WORKDIR /home/root
|
||||||
RUN git clone https://github.com/jellyfin/jellyfin.git
|
RUN git clone https://github.com/jellyfin/jellyfin.git
|
||||||
RUN mv jellyfin jellyfin-server
|
RUN mv jellyfin jellyfin-server
|
||||||
RUN git clone https://github.com/jellyfin/jellyfin-web.git
|
RUN git clone https://github.com/jellyfin/jellyfin-web.git
|
||||||
RUN dotnet publish jellyfin-server/Jellyfin.Server --configuration Release --self-contained --runtime linux-amd64 --output /home/dist/ -p:DebugSymbols=false -p:DebugType=none -p:UseAppHost=true
|
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# Build jellyfin-web
|
||||||
WORKDIR /home/root/jellyfin-web
|
WORKDIR /home/root/jellyfin-web
|
||||||
RUN npm ci --no-audit --unsafe-perm
|
RUN npm ci --no-audit --unsafe-perm
|
||||||
RUN npm run build:production
|
RUN npm run build:production
|
||||||
|
|
||||||
WORKDIR /home/root
|
WORKDIR /home/root
|
||||||
RUN rm -rf /home/dist
|
RUN mv /home/root/jellyfin-web/dist /home/root/dist/jellyfin/jellyfin-web
|
||||||
RUN mkdir /home/dist
|
|
||||||
|
|
||||||
# Patch jellyfin-server
|
|
||||||
RUN sed -i '/^\s*NetworkChange\.Network/d' jellyfin-server/src/Jellyfin.Networking/Manager/NetworkManager.cs
|
|
||||||
#RUN sed -i '/^/d' jellyfin-server/src/Jellyfin.Networking/Manager/NetworkManager.cs
|
|
||||||
|
|
||||||
RUN dotnet publish jellyfin-server/Jellyfin.Server --configuration Release --self-contained --runtime linux-musl-x64 --output /home/dist/jellyfin -p DebugSymbols=false -p:DebugType=none -p:UseAppHost=true
|
|
||||||
RUN mv /home/root/jellyfin-web/dist /home/dist/jellyfin/jellyfin-web
|
|
||||||
|
|
||||||
|
|
||||||
ENTRYPOINT ["/home/dist/jellyfin/jellyfin"]
|
ENTRYPOINT ["/home/root/dist/jellyfin/jellyfin"]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue