Skip to content

Commit

Permalink
feat(docker): expose executables in /libpostal dir
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed May 21, 2024
1 parent 19c4e0c commit 41fca9a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@ 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; \
./configure --prefix='/libpostal' --datadir='/usr/share/libpostal' --disable-sse2; \
else \
./configure --datadir='/usr/share/libpostal'; \
./configure --prefix='/libpostal' --datadir='/usr/share/libpostal'; \
fi

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

# main image
FROM pelias/baseimage

COPY --from=builder /usr/share/libpostal /usr/share/libpostal
COPY --from=builder /libpostal /
COPY --from=builder /libpostal /libpostal
COPY --from=builder /code/libpostal/src/.libs/address_parser /libpostal/bin/address_parser

# test model / executables load correctly
RUN /libpostal/bin/address_parser <<< '12 example lane, example'

0 comments on commit 41fca9a

Please sign in to comment.