Skip to content

Commit

Permalink
feat(docker): multiarch build
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed Dec 1, 2023
1 parent 43f1a10 commit 4d512b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
RUN git checkout 1fe1f0af1f328487e7397560e1b45beb6200ed85
WORKDIR /code/libpostal

# 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
Expand Down

0 comments on commit 4d512b5

Please sign in to comment.