-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from orangejulius/Dockerfile
Add Dockerfile
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM golang:1.9 | ||
|
||
# libpostal apt dependencies | ||
# note: this is done in one command in order to keep down the size of intermediate containers | ||
RUN apt-get update && \ | ||
apt-get install -y autoconf automake libtool pkg-config python && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# install libpostal | ||
RUN git clone https://github.com/openvenues/libpostal /code/libpostal | ||
WORKDIR /code/libpostal | ||
RUN ./bootstrap.sh && \ | ||
./configure --datadir=/usr/share/libpostal && \ | ||
make -j4 && make check && make install && \ | ||
ldconfig | ||
|
||
# bring in and build project go code | ||
WORKDIR /code/go-whosonfirst-libpostal | ||
COPY . . | ||
RUN make bin | ||
|
||
# set entrypoint to executable, ensuring the host is set so network requests will work | ||
# additional parameters can be passed on the command line | ||
ENTRYPOINT [ "./bin/wof-libpostal-server", "-host", "0.0.0.0" ] |