-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
50 lines (43 loc) · 1.64 KB
/
Dockerfile
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
39
40
41
42
43
44
45
46
47
48
49
50
FROM cnrsinist/ezs-python-server:py3.9-no16-1.0.11
USER root
# Set libpostal home
ENV LIBPOSTAL_HOME=/usr/share/libpostal
WORKDIR ${LIBPOSTAL_HOME}
# Install required dependcies to build libpostal
RUN apt update && \
apt install -y unzip curl autoconf automake libtool pkg-config build-essential git && \
# Download libpostal \
git clone https://github.com/openvenues/libpostal.git libpostal-master && \
cd libpostal-master && \
## Reset to a fixed commit https://github.com/openvenues/libpostal/commit/8f2066b1d30f4290adf59cacc429980f139b8545
git reset --hard 8f2066b && \
cd .. && \
# Build and install libpostal
chmod +x libpostal-master && \
cd libpostal-master && \
./bootstrap.sh && \
./configure --datadir=${LIBPOSTAL_HOME} && \
make -j4 && \
make install && \
ldconfig && \
cd .. && \
rm -rf libpostal-master && \
# Install node global dependecies
npm install -g node-gyp && \
# Install all node dependencies
cd /app/public && \
npm install \
@ezs/[email protected] \
@ezs/[email protected] && \
# Clean-up
apt remove -y unzip curl autoconf automake libtool pkg-config build-essential git && \
apt autoremove -y
# Install all python dependencies
RUN pip install backoff==2.2.1 ratelimit==2.2.1 requests==2.32.3
# Set workdir to the ws home directory
WORKDIR /app/public
# If issues with bindings with version of node higher than 20, try adding this line
# RUN cd node_modules/node_postal && npm run install
# Declare files to copy in .dockerignore
COPY --chown=daemon:daemon . /app/public/
RUN chmod a+w /app/public/config.json && mv /app/public/config.json /app