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..6ad9998 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,13 +7,19 @@ RUN apt-get update && \ apt-get install -y build-essential autoconf automake libtool pkg-config python3 # clone libpostal -RUN git clone https://github.com/openvenues/libpostal /code/libpostal +RUN git clone --depth=1 https://github.com/openvenues/libpostal /code/libpostal WORKDIR /code/libpostal +RUN git checkout 1fe1f0af1f328487e7397560e1b45beb6200ed85 # install libpostal +ARG TARGETARCH +ENV DESTDIR=/libpostal +ENV DATADIR=/usr/share/libpostal RUN ./bootstrap.sh && \ - ./configure --datadir=/usr/share/libpostal && \ - make && make check && DESTDIR=/libpostal make install && \ + # https://github.com/openvenues/libpostal/pull/632#issuecomment-1648303654 + ([ "$TARGETARCH" == "arm64" ] && ./configure --datadir="$DATADIR" --disable-sse2 || ./configure --datadir="$DATADIR") && \ + make -j4 && \ + make install && \ ldconfig # main image