fix: handle case where most builders didn't detect amd64 images on arm64

Images would build but then fail to be tagged, causing deployment problems on arm64 architectures for a small number of images.

Also fix a minor issue in the nixpacks builder that caused any pre-release-builder triggers that consumed the image to get an empty string instead.
This commit is contained in:
Jose Diaz-Gonzalez
2024-03-06 19:00:59 -05:00
parent caaf19f5a3
commit 87bde84115
4 changed files with 29 additions and 6 deletions

View File

@@ -203,6 +203,17 @@ dokku_container_log_verbose_quiet() {
IFS=$OIFS
}
fn-force-arm64-image() {
declare IMAGE="$1"
local image_architecture="$("$DOCKER_BIN" image inspect --format '{{.Architecture}}' "$IMAGE")"
if [[ "$image_architecture" == "amd64" ]] && [[ "$(dpkg --print-architecture 2>/dev/null || true)" != "amd64" ]]; then
return 0
fi
return 1
}
fn-is-valid-app-name() {
declare desc="verify that the app name matches naming restrictions"
local APP="$1"