Skip to content

Commit

Permalink
docker library: debug image - disable
Browse files Browse the repository at this point in the history
Hit a buildah quirk/bug so disabling
debug image build until better
solution presents itself.
  • Loading branch information
grooverdan committed Nov 29, 2024
1 parent a1d43fc commit 83bbda9
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions scripts/docker-library-manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@ devmanifest=$image
#
# PUSHIT - if the manifest if complete, i.e. all supported arches are there, we push
#
if [ -n "$ubi" ]; then
arches=( linux/amd64 )
else
arches=( linux/amd64 linux/arm64/v8 linux/ppc64le linux/s390x )
fi

manifest_image_cleanup() {
local manifest=$1
buildah manifest rm "$manifest" || echo "already removed"

local arches=( linux/amd64 linux/arm64/v8 linux/ppc64le linux/s390x )
for arch in "${arches[@]}"; do
# -f will remove all tags of same, like wordpress
buildah rmi -f "${manifest}-${arch}" || echo "already gone"
Expand Down Expand Up @@ -112,7 +116,20 @@ fi

debugmanifest=${image}-debug

buildah bud --all-platforms --jobs 4 --manifest "$debugmanifest" --build-arg BASE="$image" -f "mariadb-docker/Containerfile.debug$ubi"
# --all-platforms incompatible with --build-arg
# https://github.com/containers/buildah/issues/5850
# buildah bud --all-platforms --jobs 4 --manifest "$debugmanifest" --build-arg BASE="$image" -f "mariadb-docker/Containerfile.debug$ubi"


# Temp disable this as it also wasn't functioning
manifest_image_cleanup "$devmanifest" "$t"
if false; then
## intentionally array to simple
# shellcheck disable=SC2124
archlist="${arches[@]}"
# comma separated
archlist=${archlist// /,}
buildah bud --platform "${archlist}" --jobs 4 --manifest "$debugmanifest" --build-arg BASE="$image" -f "mariadb-docker/Containerfile.debug$ubi"

# now $debugmanifest is build, we can cleanup $devmanifest
manifest_image_cleanup "$devmanifest" "$t"
Expand All @@ -125,6 +142,9 @@ else
buildah manifest rm "$debugmanifest"
fi

# end of broken debug container build
fi

# all untagged images removed, and any containers that might be running on them
buildah rmi --prune --force

Expand Down

0 comments on commit 83bbda9

Please sign in to comment.