aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Rabert <ar@nullsum.net>2019-09-12 18:24:09 -0400
committerAndrew Rabert <ar@nullsum.net>2019-09-12 18:24:09 -0400
commit03f32978c0d79ff30290924e1c6e8e0ba39eda96 (patch)
tree00bb2525d96660b7ed7b609ff8b7d1acae522802
parent2919cf28ead3fc7b80dec789477eef4d2688616b (diff)
Docker - Build jellyfin-web
-rw-r--r--Dockerfile15
-rw-r--r--Dockerfile.arm16
-rw-r--r--Dockerfile.arm6416
3 files changed, 32 insertions, 15 deletions
diff --git a/Dockerfile b/Dockerfile
index ec64398b2..b9c647059 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,15 @@
ARG DOTNET_VERSION=2.2
ARG FFMPEG_VERSION=latest
+FROM node:alpine as web-builder
+ARG JELLYFIN_WEB_VERSION=v10.4.0
+RUN apk add curl \
+ && curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
+ && cd jellyfin-web-* \
+ && yarn install \
+ && yarn build \
+ && mv dist /dist
+
FROM mcr.microsoft.com/dotnet/core/sdk:${DOTNET_VERSION} as builder
WORKDIR /repo
COPY . .
@@ -21,11 +30,7 @@ RUN apt-get update \
&& chmod 777 /cache /config /media
COPY --from=ffmpeg / /
COPY --from=builder /jellyfin /jellyfin
-
-ARG JELLYFIN_WEB_VERSION=v10.4.0
-RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
- && rm -rf /jellyfin/jellyfin-web \
- && mv jellyfin-web-* /jellyfin/jellyfin-web
+COPY --from=web-builder /dist /jellyfin/jellyfin-web/src
EXPOSE 8096
VOLUME /cache /config /media
diff --git a/Dockerfile.arm b/Dockerfile.arm
index 2b1c6bb62..d06eeb561 100644
--- a/Dockerfile.arm
+++ b/Dockerfile.arm
@@ -3,6 +3,16 @@
ARG DOTNET_VERSION=3.0
+FROM node:alpine as web-builder
+ARG JELLYFIN_WEB_VERSION=v10.4.0
+RUN apk add curl \
+ && curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
+ && cd jellyfin-web-* \
+ && yarn install \
+ && yarn build \
+ && mv dist /dist
+
+
FROM mcr.microsoft.com/dotnet/core/sdk:${DOTNET_VERSION} as builder
WORKDIR /repo
COPY . .
@@ -25,11 +35,7 @@ RUN apt-get update \
&& mkdir -p /cache /config /media \
&& chmod 777 /cache /config /media
COPY --from=builder /jellyfin /jellyfin
-
-ARG JELLYFIN_WEB_VERSION=v10.4.0
-RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
- && rm -rf /jellyfin/jellyfin-web \
- && mv jellyfin-web-* /jellyfin/jellyfin-web
+COPY --from=web-builder /dist /jellyfin/jellyfin-web/src
EXPOSE 8096
VOLUME /cache /config /media
diff --git a/Dockerfile.arm64 b/Dockerfile.arm64
index 5ebc82ebc..1c5de4ed0 100644
--- a/Dockerfile.arm64
+++ b/Dockerfile.arm64
@@ -3,6 +3,16 @@
ARG DOTNET_VERSION=3.0
+FROM node:alpine as web-builder
+ARG JELLYFIN_WEB_VERSION=v10.4.0
+RUN apk add curl \
+ && curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
+ && cd jellyfin-web-* \
+ && yarn install \
+ && yarn build \
+ && mv dist /dist
+
+
FROM mcr.microsoft.com/dotnet/core/sdk:${DOTNET_VERSION} as builder
WORKDIR /repo
COPY . .
@@ -25,11 +35,7 @@ RUN apt-get update \
&& mkdir -p /cache /config /media \
&& chmod 777 /cache /config /media
COPY --from=builder /jellyfin /jellyfin
-
-ARG JELLYFIN_WEB_VERSION=v10.4.0
-RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
- && rm -rf /jellyfin/jellyfin-web \
- && mv jellyfin-web-* /jellyfin/jellyfin-web
+COPY --from=web-builder /dist /jellyfin/jellyfin-web/src
EXPOSE 8096
VOLUME /cache /config /media