Skip to content

Commit

Permalink
Another little tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrdrew committed Nov 16, 2023
1 parent 169cbf7 commit f16c52f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DOCKER_CONF="$PWD/.docker"
mkdir -p "$DOCKER_CONF"


docker buildx use multiarchbuilder


docker login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io
docker login -u="$RH_REGISTRY_USER" -p="$RH_REGISTRY_TOKEN" registry.redhat.io
Expand All @@ -39,6 +39,7 @@ VALID_TAGS_LENGTH=$(echo $RESPONSE | jq '[ .tags[] | select(.end_ts == null) ] |
if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then
# Check if the multiarchbuilder exists
if docker buildx ls | grep -q "multiarchbuilder"; then
docker buildx use multiarchbuilder
echo "Using multiarchbuilder for buildx"
# Multi-architecture build
docker buildx build --platform linux/amd64,linux/arm64 -f Dockerfile.base -t "${BASE_IMG}" --push .
Expand All @@ -54,6 +55,7 @@ fi

# Check if the multiarchbuilder exists
if docker buildx ls | grep -q "multiarchbuilder"; then
docker buildx use multiarchbuilder
echo "Using multiarchbuilder for buildx"
# Multi-architecture build
docker buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="${BASE_IMG}" -t "${IMAGE}:${IMAGE_TAG}" --push .
Expand Down

0 comments on commit f16c52f

Please sign in to comment.