From ac3781697ed9f811599c9d21fc61be26be7443e7 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Fri, 1 Dec 2023 13:45:52 +0100 Subject: [PATCH] feat(docker): multiarch build --- .github/workflows/push.yml | 1 - Dockerfile | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 231c0b5..60702fc 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -9,6 +9,5 @@ jobs: env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_BUILD_PLATFORMS: classic run: | curl "https://raw.githubusercontent.com/pelias/ci-tools/master/build-docker-images.sh" | bash - diff --git a/Dockerfile b/Dockerfile index ae6dd7f..9b12d29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,9 +12,12 @@ WORKDIR /code/libpostal # install libpostal RUN ./bootstrap.sh && \ - ./configure --datadir=/usr/share/libpostal && \ - make && make check && DESTDIR=/libpostal make install && \ - ldconfig + # https://github.com/openvenues/libpostal/pull/632#issuecomment-1648303654 + ([ "$TARGETARCH" == "arm64" ] && ./configure --datadir=/usr/share/libpostal --disable-sse2 || ./configure --datadir=/usr/share/libpostal) && \ + make -j4 && \ + DESTDIR=/libpostal make install && \ + ldconfig && \ + pkg-config --cflags libpostal # main image FROM pelias/baseimage