Skip to content

Commit

Permalink
added multi-arch docker build for linux/arm64/v8
Browse files Browse the repository at this point in the history
  • Loading branch information
mitjaziv committed Sep 11, 2022
1 parent a2cd7d9 commit eb42cbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/docker/build_and_push_docker
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

if [ $DOCKER_HUB_USERNAME ]; then docker login --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build --rm=false -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/swagger-generator && if [ ! -z "$CIRCLE_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$CIRCLE_TAG; fi && if [ ! -z "$CIRCLE_TAG" ] || [ "$CIRCLE_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME; fi; fi
if [ $DOCKER_HUB_USERNAME ]; then docker login --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build --rm=false -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/swagger-codegen-cli && if [ ! -z "$CIRCLE_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$CIRCLE_TAG; fi && if [ ! -z "$CIRCLE_TAG" ] || [ "$CIRCLE_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME; fi; fi
if [ "$DOCKER_HUB_USERNAME" ]; then docker login --username="$DOCKER_HUB_USERNAME" --password="$DOCKER_HUB_PASSWORD" && docker buildx build --platform linux/arm64/v8,linux/amd64 --rm=false -t "$DOCKER_GENERATOR_IMAGE_NAME" ./modules/swagger-generator && if [ -n "$CIRCLE_TAG" ]; then docker tag "$DOCKER_GENERATOR_IMAGE_NAME:latest" "$DOCKER_GENERATOR_IMAGE_NAME:$CIRCLE_TAG"; fi && if [ -n "$CIRCLE_TAG" ] || [ "$CIRCLE_BRANCH" = "master" ]; then docker push "$DOCKER_GENERATOR_IMAGE_NAME"; fi; fi
if [ "$DOCKER_HUB_USERNAME" ]; then docker login --username="$DOCKER_HUB_USERNAME" --password="$DOCKER_HUB_PASSWORD" && docker buildx build --platform linux/arm64/v8,linux/amd64 --rm=false -t "$DOCKER_CODEGEN_CLI_IMAGE_NAME" ./modules/swagger-codegen-cli && if [ -n "$CIRCLE_TAG" ]; then docker tag "$DOCKER_CODEGEN_CLI_IMAGE_NAME:latest" "$DOCKER_CODEGEN_CLI_IMAGE_NAME:$CIRCLE_TAG"; fi && if [ -n "$CIRCLE_TAG" ] || [ "$CIRCLE_BRANCH" = "master" ]; then docker push "$DOCKER_CODEGEN_CLI_IMAGE_NAME"; fi; fi

0 comments on commit eb42cbb

Please sign in to comment.