From 4bffd65b324ca4d107ab6e1cdc9b3b6f583535e8 Mon Sep 17 00:00:00 2001 From: Sejong Yoo Date: Fri, 11 Sep 2026 16:37:42 +0900 Subject: [PATCH] Reuse the agent container mounts for the build step. The agent talks to the host daemon over docker.sock, so binding the in-container workspace path failed on the NAS. Co-authored-by: Cursor --- Jenkinsfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 70b555e..6741642 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,12 +20,18 @@ pipeline { steps { sh ''' set -eu + # DooD: docker.sock talks to the host daemon, so -v "$PWD" looks for + # that path on the NAS and fails. Reuse the agent container mounts. + if docker inspect "$(hostname)" >/dev/null 2>&1; then + set -- --volumes-from "$(hostname)" -w "$PWD" + else + set -- -v "$PWD":/app -w /app + fi docker run --rm \ -u "$(id -u):$(id -g)" \ -e HOME=/tmp \ -e NODE_OPTIONS \ - -v "$PWD":/app \ - -w /app \ + "$@" \ "$NODE_IMAGE" \ bash -lc 'npm ci && npm run build' '''