The Free Software Media System - Server Backend & API
Mount the source volume rather than copy it
Joshua M. Boniface8b1a76a32e5c
diff --git a/build.sh b/build.shindex f54ce04ce7..5d3f8ec713 100755--- a/build.sh+++ b/build.sh@@ -16,7 +16,7 @@ usage() {echo -e " * docker: Build using the build script in a standardized Docker container"echo -e " * PLATFORM can be any platform shown by -l/--list-platforms and must be specified"echo -e " * If -k/--keep-artifacts is specified, transient artifacts (e.g. Docker containers) will be"- echo -e " retained after the build is finished"+ echo -e " retained after the build is finished; the source directory will still be cleaned"echo -e " * If -l/--list-platforms is specified, all other arguments are ignored; the script will print"echo -e " the list of supported platforms and exit"}@@ -59,7 +59,7 @@ do_build_docker() {docker build . -t "jellyfin-builder.${PLATFORM}" -f deployment/Dockerfile.${PLATFORM}mkdir -p ${ARTIFACT_DIR}- docker run $docker_args -v "${ARTIFACT_DIR}:/dist" "jellyfin-builder.${PLATFORM}"+ docker run $docker_args -v "${SOURCE_DIR}:/jellyfin" -v "${ARTIFACT_DIR}:/dist" "jellyfin-builder.${PLATFORM}"}while [[ $# -gt 0 ]]; dodiff --git a/deployment/Dockerfile.debian.amd64 b/deployment/Dockerfile.debian.amd64index 47c13fa712..b5a0380489 100644--- a/deployment/Dockerfile.debian.amd64+++ b/deployment/Dockerfile.debian.amd64@@ -24,11 +24,8 @@ RUN wget https://download.visualstudio.microsoft.com/download/pr/d731f991-8e68-4# Link to build scriptRUN ln -sf ${SOURCE_DIR}/deployment/build.debian.amd64 /build.sh-# Create the source dir-RUN mkdir -p ${SOURCE_DIR}+VOLUME ${SOURCE_DIR}/VOLUME ${ARTIFACT_DIR}/-COPY . ${SOURCE_DIR}/-ENTRYPOINT ["/build.sh"]diff --git a/deployment/Dockerfile.debian.arm64 b/deployment/Dockerfile.debian.arm64index 7b792d7e16..cfe562df33 100644--- a/deployment/Dockerfile.debian.arm64+++ b/deployment/Dockerfile.debian.arm64@@ -32,11 +32,8 @@ RUN dpkg --add-architecture arm64 \# Link to build scriptRUN ln -sf ${SOURCE_DIR}/deployment/build.debian.arm64 /build.sh-# Create the source dir-RUN mkdir -p ${SOURCE_DIR}+VOLUME ${SOURCE_DIR}/VOLUME ${ARTIFACT_DIR}/-COPY . ${SOURCE_DIR}/-ENTRYPOINT ["/build.sh"]diff --git a/deployment/Dockerfile.debian.armhf b/deployment/Dockerfile.debian.armhfindex d633d316a2..ea8c8c8e62 100644--- a/deployment/Dockerfile.debian.armhf+++ b/deployment/Dockerfile.debian.armhf@@ -32,11 +32,8 @@ RUN dpkg --add-architecture armhf \# Link to build scriptRUN ln -sf ${SOURCE_DIR}/deployment/build.debian.armhf /build.sh-# Create the source dir-RUN mkdir -p ${SOURCE_DIR}+VOLUME ${SOURCE_DIR}/VOLUME ${ARTIFACT_DIR}/-COPY . ${SOURCE_DIR}/-ENTRYPOINT ["/build.sh"]diff --git a/deployment/Dockerfile.ubuntu.amd64 b/deployment/Dockerfile.ubuntu.amd64index e1b0c3975d..e61be4efcc 100644--- a/deployment/Dockerfile.ubuntu.amd64+++ b/deployment/Dockerfile.ubuntu.amd64@@ -24,11 +24,8 @@ RUN wget https://download.visualstudio.microsoft.com/download/pr/d731f991-8e68-4# Link to build scriptRUN ln -sf ${SOURCE_DIR}/deployment/build.ubuntu.amd64 /build.sh-# Create the source dir-RUN mkdir -p ${SOURCE_DIR}+VOLUME ${SOURCE_DIR}/VOLUME ${ARTIFACT_DIR}/-COPY . ${SOURCE_DIR}/-ENTRYPOINT ["/build.sh"]diff --git a/deployment/Dockerfile.ubuntu.arm64 b/deployment/Dockerfile.ubuntu.arm64index 98dfbf7dd6..e34ef7edd1 100644--- a/deployment/Dockerfile.ubuntu.arm64+++ b/deployment/Dockerfile.ubuntu.arm64@@ -43,11 +43,8 @@ RUN rm /etc/apt/sources.list \# Link to build scriptRUN ln -sf ${SOURCE_DIR}/deployment/build.ubuntu.arm64 /build.sh-# Create the source dir-RUN mkdir -p ${SOURCE_DIR}+VOLUME ${SOURCE_DIR}/VOLUME ${ARTIFACT_DIR}/-COPY . ${SOURCE_DIR}/-ENTRYPOINT ["/build.sh"]diff --git a/deployment/Dockerfile.ubuntu.armhf b/deployment/Dockerfile.ubuntu.armhfindex 30cd861359..6f92c81ab1 100644--- a/deployment/Dockerfile.ubuntu.armhf+++ b/deployment/Dockerfile.ubuntu.armhf@@ -43,11 +43,8 @@ RUN rm /etc/apt/sources.list \# Link to build scriptRUN ln -sf ${SOURCE_DIR}/deployment/build.debian.armhf /build.sh-# Create the source dir-RUN mkdir -p ${SOURCE_DIR}+VOLUME ${SOURCE_DIR}/VOLUME ${ARTIFACT_DIR}/-COPY . ${SOURCE_DIR}/-ENTRYPOINT ["/build.sh"]