-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (32 loc) · 1.14 KB
/
Dockerfile
File metadata and controls
38 lines (32 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM debian:bookworm
RUN apt-get update && \
apt-get -y install git curl \
build-essential autoconf automake libtool pkg-config
# libpostal
RUN cd /tmp && \
git clone https://github.com/openvenues/libpostal && \
cd libpostal && \
./bootstrap.sh && \
mkdir -p /usr/lib/libpostal /var/task/libpostal/data && \
./configure --disable-data-download --datadir=/var/task/libpostal/data
RUN cd /tmp/libpostal && \
make -j4 && \
make install && \
ldconfig
# Note: We're disabling all chunking since the download seems to fail everytime we're trying to download in chunks
RUN cd /tmp/libpostal && \
sed -i -E 's/_CHUNKS=[0-9]+/_CHUNKS=1/g' /usr/local/bin/libpostal_data && \
libpostal_data download all /var/task/libpostal/data/libpostal
# postal-php
RUN apt-get update && \
apt-get -y install libreadline-dev libsnappy-dev \
php-cli php-dev php-curl php-mbstring php-zip php-dom php-gd php-sqlite3 php-geos
RUN cd /tmp && \
git clone https://github.com/openvenues/php-postal && \
cd php-postal && \
phpize && \
pkg-config libpostal && \
./configure && \
make && \
make install && \
cp modules/postal.so /usr/lib/php/postal.so