diff --git a/build_truenas.sh b/build_truenas.sh index 04c2b3e..83c60bf 100755 --- a/build_truenas.sh +++ b/build_truenas.sh @@ -24,7 +24,7 @@ echo "==================================================" # Create temp build directory on TrueNAS echo "Creating build directory on TrueNAS..." -ssh root@${TRUENAS_HOST} "mkdir -p ${BUILD_DIR}" +ssh -A root@${TRUENAS_HOST} "mkdir -p ${BUILD_DIR}" # Sync repository to TrueNAS (excluding submodules, will init on TrueNAS) echo "Syncing repository to TrueNAS..." @@ -38,7 +38,7 @@ rsync -avz --progress \ # Update submodule URLs to use IP address and initialize on TrueNAS echo "Initializing submodules on TrueNAS..." -ssh root@${TRUENAS_HOST} "cd ${BUILD_DIR} && \ +ssh -A root@${TRUENAS_HOST} "cd ${BUILD_DIR} && \ git config --global --add safe.directory ${BUILD_DIR} && \ git config submodule.jellyfin-server.url ssh://git@192.168.79.249:222/admin/jellyfin.git && \ git config submodule.jellyfin-web.url ssh://git@192.168.79.249:222/admin/jellyfin-web.git && \ @@ -46,7 +46,7 @@ ssh root@${TRUENAS_HOST} "cd ${BUILD_DIR} && \ # Build Docker image on TrueNAS echo "Building Docker image on TrueNAS..." -ssh root@${TRUENAS_HOST} "cd ${BUILD_DIR} && docker build \ +ssh -A root@${TRUENAS_HOST} "cd ${BUILD_DIR} && docker build \ --build-arg DOTNET_VERSION=9.0 \ --build-arg PACKAGE_ARCH=amd64 \ --build-arg DOTNET_ARCH=x64 \ @@ -58,11 +58,11 @@ ssh root@${TRUENAS_HOST} "cd ${BUILD_DIR} && docker build \ # Tag image echo "Tagging image..." -ssh root@${TRUENAS_HOST} "docker tag jellyfin:${IMAGE_TAG} jellyfin:latest" +ssh -A root@${TRUENAS_HOST} "docker tag jellyfin:${IMAGE_TAG} jellyfin:latest" # Cleanup echo "Cleaning up build directory..." -ssh root@${TRUENAS_HOST} "rm -rf ${BUILD_DIR}" +ssh -A root@${TRUENAS_HOST} "rm -rf ${BUILD_DIR}" echo "==================================================" echo "✓ Build complete!" diff --git a/docker/Dockerfile b/docker/Dockerfile index 5669e22..220edca 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -63,6 +63,8 @@ RUN apk add \ && git config --global --add safe.directory /jellyfin/jellyfin-web WORKDIR ${SOURCE_DIR} +# Copy submodule git metadata to parent directory where jellyfin-web/.git references it +COPY .git/modules/jellyfin-web /.git/modules/jellyfin-web COPY jellyfin-web . RUN npm ci --no-audit --unsafe-perm \