From 805cdddf33dc95214f6c4ccdc38565b6985c8ed6 Mon Sep 17 00:00:00 2001 From: Mar Alegre Date: Sun, 27 Jul 2025 21:47:33 -0400 Subject: [PATCH] don't pull for local images --- .install/bin/pdm-build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.install/bin/pdm-build b/.install/bin/pdm-build index ef724a3..e0ccb51 100755 --- a/.install/bin/pdm-build +++ b/.install/bin/pdm-build @@ -87,7 +87,12 @@ if [[ $opt_squash -eq 1 ]]; then buildopts="$buildopts --squash-all" fi if [[ $opt_redo -eq 1 ]]; then - buildopts="$buildopts --no-cache --pull" + buildopts="$buildopts --no-cache" + + registry=$(grep -m 1 "^FROM " Containerfile | sed -E 's/FROM ([a-zA-Z0-9.]*)(\/.*)?/\1/') + if [[ "$registry" != 'localhost' ]]; then + buildopts="$buildopts --pull" + fi fi # tell buildah to build images in docker format instead of the default OCI format