Fix Docker Build permission issue (#95)

During docker build `npm install` running as node was exiting with 243 (EACCES) from trying to install the tgz files because `npm pack` created the files with 400 permissions on my system.
This commit is contained in:
Seth Troisi
2025-04-21 14:35:03 -07:00
committed by GitHub
parent 3f048bce0f
commit 7663ccf0bd
2 changed files with 6 additions and 4 deletions

View File

@@ -57,9 +57,12 @@ echo "packing @gemini-code/server ..."
rm -f packages/server/dist/gemini-code-server-*.tgz
npm pack -w @gemini-code/server --pack-destination ./packages/server/dist &> /dev/null
# Give node user access to tgz files
chmod 755 packages/*/dist/gemini-code-*.tgz
# build container image & prune older unused images
# use empty --authfile to skip unnecessary auth refresh overhead
echo "building $IMAGE ... (can be slow first time)"
$CMD build --authfile <(echo '{}') -t "$IMAGE" . >/dev/null
$CMD image prune -f
echo "built $IMAGE"
echo "built $IMAGE"