Skip to content

Commit

Permalink
Setup QEMU
Browse files Browse the repository at this point in the history
  • Loading branch information
huyennguyen-katalon committed Oct 2, 2024
1 parent 36ec97b commit 4d92421
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
34 changes: 21 additions & 13 deletions .github/workflows/workflow-ecr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,18 @@ jobs:
DOCKER_IMAGE_PUBLISHED_TAG: build-arm
steps:
- name: Checkout
uses: actions/checkout@master
- name : Prepare docker install
uses: actions/checkout@master
- name: Set up QEMU dependency
uses: docker/setup-qemu-action@v2
- name: Set up Docker Context for Buildx
shell: bash
run: |
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo apt -y install jq docker-ce docker-ce-cli containerd.io binfmt-support qemu-user-static
export DOCKER_BUILDKIT=1
sudo systemctl restart docker
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Build
run: |
chmod u+x ./build/*.sh
./build/clean.sh $KRE_VERSION
./build/build.sh $KRE_VERSION
docker context create builders
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
endpoint: builders
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
Expand All @@ -39,6 +37,16 @@ jobs:
mask-aws-account-id: "no"
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build
run: |
chmod u+x ./build/*.sh
./build/clean.sh $KRE_VERSION
./build/build.sh $KRE_VERSION
- name: Tag Docker image with commit ID
run: |
docker images
Expand Down
3 changes: 1 addition & 2 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ set -xe

ksversion=$1

docker buildx create --name mybuilder --driver docker-container --use --bootstrap
docker buildx build --platform linux/amd64,linux/arm64 --push -t katalon-katalon -f src/Dockerfile --build-arg KATALON_STUDIO_VERSION=$ksversion .
docker buildx build --push --platform linux/amd64,linux/arm64 -t katalon-katalon -f src/Dockerfile --build-arg KATALON_STUDIO_VERSION=$ksversion .

0 comments on commit 4d92421

Please sign in to comment.