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 60602fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 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 -
17 changes: 13 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,19 @@ RUN git clone https://github.com/openvenues/libpostal /code/libpostal
WORKDIR /code/libpostal

# install libpostal
RUN ./bootstrap.sh && \
./configure --datadir=/usr/share/libpostal && \
make && make check && DESTDIR=/libpostal make install && \
ldconfig
RUN ./bootstrap.sh

# https://github.com/openvenues/libpostal/pull/632#issuecomment-1648303654
ARG TARGETARCH
RUN if [ "$TARGETARCH" = "arm64" ]; then \
./configure --datadir='/usr/share/libpostal' --disable-sse2; \
else \
./configure --datadir='/usr/share/libpostal'; \
fi

RUN make -j4
RUN DESTDIR=/libpostal make install
RUN ldconfig

# main image
FROM pelias/baseimage
Expand Down

0 comments on commit 60602fd

Please sign in to comment.