From 79d4363d5972ea4d69abd92b26cda80de7941365 Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 9 Mar 2022 04:02:11 +0800 Subject: [PATCH] Enable arm docker build (#6172) This issue enables dockerX for multi-arch docker image building. Resulting images can be run on x86 and arm processors (for example aws graviton). --- .github/workflows/osrm-backend-docker.yml | 19 +++++++++---------- CHANGELOG.md | 1 + 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/osrm-backend-docker.yml b/.github/workflows/osrm-backend-docker.yml index 2ca918607ae..e0cf8939db4 100644 --- a/.github/workflows/osrm-backend-docker.yml +++ b/.github/workflows/osrm-backend-docker.yml @@ -11,6 +11,11 @@ jobs: - name: Check out the repo uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 - name: Docker meta id: meta @@ -34,10 +39,7 @@ jobs: images: ghcr.io/${{ github.repository }} flavor: | latest=true - suffix=-assertions,onlatest=true - - - + suffix=-assertions,onlatest=true - name: Log in to GitHub Docker Registry uses: docker/login-action@v1 @@ -46,16 +48,11 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - - - - - - name: Build container image - debug uses: docker/build-push-action@v2 with: push: true + platforms: linux/amd64,linux/arm64 file: ./docker/Dockerfile tags: ${{ steps.metadebug.outputs.tags }} build-args: | @@ -66,6 +63,7 @@ jobs: uses: docker/build-push-action@v2 with: push: true + platforms: linux/amd64,linux/arm64 file: ./docker/Dockerfile tags: ${{ steps.metaassertions.outputs.tags }} build-args: | @@ -76,6 +74,7 @@ jobs: uses: docker/build-push-action@v2 with: push: true + platforms: linux/amd64,linux/arm64 file: ./docker/Dockerfile tags: ${{ steps.meta.outputs.tags }} build-args: | diff --git a/CHANGELOG.md b/CHANGELOG.md index ca94479e5ed..7081b636e57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - FIXED: Run all unit tests in CI [#5248](https://github.com/Project-OSRM/osrm-backend/pull/5248) - FIXED: Fix installation of Mason CMake and 32 bit CI build [#6170](https://github.com/Project-OSRM/osrm-backend/pull/6170) - FIXED: Fixed Node docs generation check in CI. [#6058](https://github.com/Project-OSRM/osrm-backend/pull/6058) + - CHANGED: Docker build, enabled arm64 build layer [#6172](https://github.com/Project-OSRM/osrm-backend/pull/6172) - CHANGED: Docker build, enabled apt-get update/install caching in separate layer for build phase [#6175](https://github.com/Project-OSRM/osrm-backend/pull/6175) # 5.26.0