summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Troisi <[email protected]>2025-04-23 22:23:48 +0000
committerSeth Troisi <[email protected]>2025-04-23 15:46:51 -0700
commit72d0b73598c9debb8c22f0421f73fcc6549f2905 (patch)
treecfd074bbfb0bc96fde4442f9c2a94715c47cc569
parent4c951ea43572350004d62b4e924d86f6a85b6da2 (diff)
Add docker equivilant for --authfile
-rwxr-xr-xscripts/build_sandbox.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/build_sandbox.sh b/scripts/build_sandbox.sh
index a18af1fe..20a255a0 100755
--- a/scripts/build_sandbox.sh
+++ b/scripts/build_sandbox.sh
@@ -54,12 +54,20 @@ 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
+# 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
+
+if [[ "$CMD" == "podman" ]]; then
+ # use empty --authfile to skip unnecessary auth refresh overhead
+ $CMD build --authfile=<(echo '{}') -t "$IMAGE" . >/dev/null
+elif [[ "$CMD" == "docker" ]]; then
+ # use an empty config directory to skip unnecessary auth refresh overhead
+ $CMD --config="empty" build -t "$IMAGE" . >/dev/null
+else
+ $CMD build -t "$IMAGE" . >/dev/null
+fi
$CMD image prune -f >/dev/null
echo "built $IMAGE"