Skip to content

Commit

Permalink
feat(docker): expose address_parser executable
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed May 24, 2024
1 parent 19c4e0c commit 53348d2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,27 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \
./configure --datadir='/usr/share/libpostal'; \
fi

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

# copy address_parser executable
RUN cp /code/libpostal/src/.libs/address_parser /libpostal/usr/local/bin/

# -------------------------------------------------------------

# main image
FROM pelias/baseimage

# copy data
COPY --from=builder /usr/share/libpostal /usr/share/libpostal

# copy build
COPY --from=builder /libpostal /

# ensure /usr/local/lib is on LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"

# test model / executable load correctly
RUN echo '12 example lane, example' | address_parser

0 comments on commit 53348d2

Please sign in to comment.