Skip to content

Commit

Permalink
output manifest command for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveitaly committed Jun 20, 2024
1 parent ee08e17 commit 006df7d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ function build_and_push() {
}

function build_and_push_multiple_architectures() {
echo "Building for multiple architectures: ${PLATFORMS[*]}"

local manifest_list=()

for platform in "${PLATFORMS[@]}"; do
Expand All @@ -102,19 +104,23 @@ function build_and_push_multiple_architectures() {
build_cmd="$build_cmd --platform $platform"
build_cmd="$build_cmd --tag $temporary_image_name"

echo "Executing Nixpacks build command:"
echo "Executing Nixpacks build command for $platform:"
echo "$build_cmd"

eval "$build_cmd"

manifest_list+=("$temporary_image_name")
done

echo "Multi-architecture build completed. Constructing manifest and pushing to registry..."

# now, with all architectures built locally, we can construct a manifest and push to the registry
for tag in "${TAGS[@]}"; do
echo "Creating manifest and pushing for tag $tag..."

docker manifest create "$tag" "${manifest_list[@]}"
local manifest_creation="docker manifest create $tag ${manifest_list[@]}"
echo "Creating manifest: $manifest_creation"
eval "$manifest_creation"

docker manifest push "$tag"
done
}
Expand Down

0 comments on commit 006df7d

Please sign in to comment.