-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (26 loc) · 1.25 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
FROM ubuntu:24.04
EXPOSE 8080
ENV DEBIAN_FRONTEND=noninteractive
ENV USERNAME=nominatim
ENV USERHOME=/srv/$USERNAME
RUN apt-get update -qq && \
apt-get install -y osm2pgsql postgresql-postgis postgresql-postgis-scripts \
pkg-config libicu-dev git wget python3-pip && \
useradd -d $USERHOME -s /bin/bash -m $USERNAME && \
mkdir -p $USERHOME && mkdir -p /nominatim-data && \
chown -R $USERNAME:$USERNAME /nominatim-data && \
chmod -R 755 /nominatim-data && \
chown -R $USERNAME:$USERNAME $USERHOME
WORKDIR $USERHOME
USER $USERNAME
RUN git clone --depth=1 https://github.com/openstreetmap/Nominatim.git && \
cd Nominatim && \
wget -O data/country_osm_grid.sql.gz https://nominatim.org/data/country_grid.sql.gz && \
pip install --user --upgrade pip --break-system-packages && \
pip install --user psycopg[binary] falcon uvicorn gunicorn --break-system-packages && \
pip install --user -e ./packaging/nominatim-db --break-system-packages && \
pip install --user -e ./packaging/nominatim-api --break-system-packages
ENV PATH="$USERHOME/.local/bin:$PATH"
COPY --chown=$USERNAME:$USERNAME ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]