From da61998ad611bf25d5644223a82eed1cf2e3d835 Mon Sep 17 00:00:00 2001 From: Thomas Büttner Date: Fri, 22 Feb 2019 13:52:32 +0100 Subject: Build releases without debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Büttner --- Dockerfile.arm | 1 + 1 file changed, 1 insertion(+) (limited to 'Dockerfile.arm') diff --git a/Dockerfile.arm b/Dockerfile.arm index 9d1c30619b..9316245c50 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -21,6 +21,7 @@ RUN dotnet publish \ -r linux-arm \ --configuration release \ --output /jellyfin \ + "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" \ Jellyfin.Server -- cgit v1.2.3 From 38ec68c488c0c8e88989dc7c3fdc0824cfe71343 Mon Sep 17 00:00:00 2001 From: Thomas Büttner Date: Sun, 24 Feb 2019 11:17:39 +0100 Subject: use common.build.sh for docker image builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Büttner --- Dockerfile | 7 ++----- Dockerfile.arm | 8 ++------ Dockerfile.arm64 | 8 ++------ deployment/common.build.sh | 3 +-- 4 files changed, 7 insertions(+), 19 deletions(-) (limited to 'Dockerfile.arm') diff --git a/Dockerfile b/Dockerfile index af570ba655..3562688419 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,8 @@ FROM microsoft/dotnet:${DOTNET_VERSION}-sdk as builder WORKDIR /repo COPY . . ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 -RUN dotnet publish \ - --configuration release \ - --output /jellyfin \ - "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" \ - Jellyfin.Server +RUN bash -c "source deployment/common.build.sh && \ + build_jellyfin Jellyfin.Server Release linux-x64 /jellyfin" FROM jellyfin/ffmpeg as ffmpeg FROM microsoft/dotnet:${DOTNET_VERSION}-runtime diff --git a/Dockerfile.arm b/Dockerfile.arm index 9316245c50..69c5d446e8 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -17,12 +17,8 @@ RUN find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \; # Discard objs - may cause failures if exists RUN find . -type d -name obj | xargs -r rm -r # Build -RUN dotnet publish \ - -r linux-arm \ - --configuration release \ - --output /jellyfin \ - "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" \ - Jellyfin.Server +RUN bash -c "source deployment/common.build.sh && \ + build_jellyfin Jellyfin.Server Release linux-arm /jellyfin" FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm32v7 diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 5c67f85c9b..b85f8735bd 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -18,12 +18,8 @@ RUN find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \; # Discard objs - may cause failures if exists RUN find . -type d -name obj | xargs -r rm -r # Build -RUN dotnet publish \ - -r linux-arm64 \ - --configuration release \ - --output /jellyfin \ - "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" \ - Jellyfin.Server +RUN bash -c "source deployment/common.build.sh && \ + build_jellyfin Jellyfin.Server Release linux-arm64 /jellyfin" FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm64v8 diff --git a/deployment/common.build.sh b/deployment/common.build.sh index 5bffa1a732..d028e3a668 100755 --- a/deployment/common.build.sh +++ b/deployment/common.build.sh @@ -15,7 +15,6 @@ DEFAULT_CONFIG="Release" DEFAULT_OUTPUT_DIR="dist/jellyfin-git" DEFAULT_PKG_DIR="pkg-dist" DEFAULT_DOCKERFILE="Dockerfile" -DEFAULT_IMAGE_TAG="jellyfin:"`git rev-parse --abbrev-ref HEAD` DEFAULT_ARCHIVE_CMD="tar -xvzf" # Parse the version from the AssemblyVersion @@ -53,7 +52,7 @@ build_jellyfin_docker() ( BUILD_CONTEXT=${1-$DEFAULT_BUILD_CONTEXT} DOCKERFILE=${2-$DEFAULT_DOCKERFILE} - IMAGE_TAG=${3-$DEFAULT_IMAGE_TAG} + IMAGE_TAG=${3-"jellyfin:$(git rev-parse --abbrev-ref HEAD)"} echo -e "${CYAN}Building jellyfin docker image in '${BUILD_CONTEXT}' with Dockerfile '${DOCKERFILE}' and tag '${IMAGE_TAG}'.${NC}" docker build -t ${IMAGE_TAG} -f ${DOCKERFILE} ${BUILD_CONTEXT} -- cgit v1.2.3 From 1d1e6dede94596dc4e613a59c1561fe96447581c Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Wed, 27 Feb 2019 20:56:50 -0500 Subject: Set ffmpeg+ffprobe paths in Docker container Will always ensure containers use correct path. Yes - the arm images have a different path than the amd64 one. This is caused by the amd64 image using ffmpeg from jellyfin/ffmpeg while the others use ffmpeg from their distro's repos. --- Dockerfile | 6 +++++- Dockerfile.arm | 6 +++++- Dockerfile.arm64 | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'Dockerfile.arm') diff --git a/Dockerfile b/Dockerfile index 3562688419..e2d424df78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,4 +22,8 @@ COPY --from=ffmpeg / / COPY --from=builder /jellyfin /jellyfin EXPOSE 8096 VOLUME /cache /config /media -ENTRYPOINT dotnet /jellyfin/jellyfin.dll --datadir /config --cachedir /cache +ENTRYPOINT dotnet /jellyfin/jellyfin.dll \ + --datadir /config \ + --cachedir /cache \ + --ffmpeg /usr/local/bin/ffmpeg \ + --ffprobe /usr/local/bin/ffprobe diff --git a/Dockerfile.arm b/Dockerfile.arm index 69c5d446e8..d220763a2c 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -30,4 +30,8 @@ RUN apt-get update \ COPY --from=builder /jellyfin /jellyfin EXPOSE 8096 VOLUME /cache /config /media -ENTRYPOINT dotnet /jellyfin/jellyfin.dll --datadir /config --cachedir /cache +ENTRYPOINT dotnet /jellyfin/jellyfin.dll \ + --datadir /config \ + --cachedir /cache \ + --ffmpeg /usr/bin/ffmpeg \ + --ffprobe /usr/bin/ffprobe diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index b85f8735bd..243b841e92 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -31,4 +31,8 @@ RUN apt-get update \ COPY --from=builder /jellyfin /jellyfin EXPOSE 8096 VOLUME /cache /config /media -ENTRYPOINT dotnet /jellyfin/jellyfin.dll --datadir /config --cachedir /cache +ENTRYPOINT dotnet /jellyfin/jellyfin.dll \ + --datadir /config \ + --cachedir /cache \ + --ffmpeg /usr/bin/ffmpeg \ + --ffprobe /usr/bin/ffprobe -- cgit v1.2.3 From 27f9981142b4a75ceaff3a4b0f13f40b7d9467d6 Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Fri, 1 Mar 2019 00:17:46 -0500 Subject: Treat jellyfin-web as just another dependency for Docker builds --- Dockerfile | 6 ++++++ Dockerfile.arm | 6 ++++++ Dockerfile.arm64 | 6 ++++++ 3 files changed, 18 insertions(+) (limited to 'Dockerfile.arm') diff --git a/Dockerfile b/Dockerfile index e2d424df78..91a4f5a2d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,12 @@ RUN apt-get update \ && chmod 777 /cache /config /media COPY --from=ffmpeg / / COPY --from=builder /jellyfin /jellyfin + +ARG JELLYFIN_WEB_VERSION=10.2.2 +RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \ + && rm -rf /jellyfin/jellyfin-web \ + && mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web + EXPOSE 8096 VOLUME /cache /config /media ENTRYPOINT dotnet /jellyfin/jellyfin.dll \ diff --git a/Dockerfile.arm b/Dockerfile.arm index d220763a2c..42f0354a32 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -28,6 +28,12 @@ RUN apt-get update \ && mkdir -p /cache /config /media \ && chmod 777 /cache /config /media COPY --from=builder /jellyfin /jellyfin + +ARG JELLYFIN_WEB_VERSION=10.2.2 +RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \ + && rm -rf /jellyfin/jellyfin-web \ + && mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web + EXPOSE 8096 VOLUME /cache /config /media ENTRYPOINT dotnet /jellyfin/jellyfin.dll \ diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 243b841e92..d3103d3893 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -29,6 +29,12 @@ RUN apt-get update \ && mkdir -p /cache /config /media \ && chmod 777 /cache /config /media COPY --from=builder /jellyfin /jellyfin + +ARG JELLYFIN_WEB_VERSION=10.2.2 +RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \ + && rm -rf /jellyfin/jellyfin-web \ + && mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web + EXPOSE 8096 VOLUME /cache /config /media ENTRYPOINT dotnet /jellyfin/jellyfin.dll \ -- cgit v1.2.3