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