mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
use common.build.sh for docker image builds
Signed-off-by: Thomas Büttner <thomas@vergesslicher.tech>
This commit is contained in:
parent
da61998ad6
commit
38ec68c488
@ -4,11 +4,8 @@ FROM microsoft/dotnet:${DOTNET_VERSION}-sdk as builder
|
|||||||
WORKDIR /repo
|
WORKDIR /repo
|
||||||
COPY . .
|
COPY . .
|
||||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
RUN dotnet publish \
|
RUN bash -c "source deployment/common.build.sh && \
|
||||||
--configuration release \
|
build_jellyfin Jellyfin.Server Release linux-x64 /jellyfin"
|
||||||
--output /jellyfin \
|
|
||||||
"-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" \
|
|
||||||
Jellyfin.Server
|
|
||||||
|
|
||||||
FROM jellyfin/ffmpeg as ffmpeg
|
FROM jellyfin/ffmpeg as ffmpeg
|
||||||
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime
|
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime
|
||||||
|
@ -17,12 +17,8 @@ RUN find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \;
|
|||||||
# Discard objs - may cause failures if exists
|
# Discard objs - may cause failures if exists
|
||||||
RUN find . -type d -name obj | xargs -r rm -r
|
RUN find . -type d -name obj | xargs -r rm -r
|
||||||
# Build
|
# Build
|
||||||
RUN dotnet publish \
|
RUN bash -c "source deployment/common.build.sh && \
|
||||||
-r linux-arm \
|
build_jellyfin Jellyfin.Server Release linux-arm /jellyfin"
|
||||||
--configuration release \
|
|
||||||
--output /jellyfin \
|
|
||||||
"-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" \
|
|
||||||
Jellyfin.Server
|
|
||||||
|
|
||||||
|
|
||||||
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm32v7
|
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm32v7
|
||||||
|
@ -18,12 +18,8 @@ RUN find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \;
|
|||||||
# Discard objs - may cause failures if exists
|
# Discard objs - may cause failures if exists
|
||||||
RUN find . -type d -name obj | xargs -r rm -r
|
RUN find . -type d -name obj | xargs -r rm -r
|
||||||
# Build
|
# Build
|
||||||
RUN dotnet publish \
|
RUN bash -c "source deployment/common.build.sh && \
|
||||||
-r linux-arm64 \
|
build_jellyfin Jellyfin.Server Release linux-arm64 /jellyfin"
|
||||||
--configuration release \
|
|
||||||
--output /jellyfin \
|
|
||||||
"-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" \
|
|
||||||
Jellyfin.Server
|
|
||||||
|
|
||||||
|
|
||||||
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm64v8
|
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime-stretch-slim-arm64v8
|
||||||
|
@ -15,7 +15,6 @@ DEFAULT_CONFIG="Release"
|
|||||||
DEFAULT_OUTPUT_DIR="dist/jellyfin-git"
|
DEFAULT_OUTPUT_DIR="dist/jellyfin-git"
|
||||||
DEFAULT_PKG_DIR="pkg-dist"
|
DEFAULT_PKG_DIR="pkg-dist"
|
||||||
DEFAULT_DOCKERFILE="Dockerfile"
|
DEFAULT_DOCKERFILE="Dockerfile"
|
||||||
DEFAULT_IMAGE_TAG="jellyfin:"`git rev-parse --abbrev-ref HEAD`
|
|
||||||
DEFAULT_ARCHIVE_CMD="tar -xvzf"
|
DEFAULT_ARCHIVE_CMD="tar -xvzf"
|
||||||
|
|
||||||
# Parse the version from the AssemblyVersion
|
# Parse the version from the AssemblyVersion
|
||||||
@ -53,7 +52,7 @@ build_jellyfin_docker()
|
|||||||
(
|
(
|
||||||
BUILD_CONTEXT=${1-$DEFAULT_BUILD_CONTEXT}
|
BUILD_CONTEXT=${1-$DEFAULT_BUILD_CONTEXT}
|
||||||
DOCKERFILE=${2-$DEFAULT_DOCKERFILE}
|
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}"
|
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}
|
docker build -t ${IMAGE_TAG} -f ${DOCKERFILE} ${BUILD_CONTEXT}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user