openstreetmap-carto/Dockerfile
Thomas Pétillon b7e0691161
Adapt Docker setup to latest changes (#5045)
* Adapt Docker setup to latest changes

And use newer versions of base images.

* Remove fonts from Dockerfile, as they are downloaded separately

* Mention the external data download in Docker documentation

* Add more log messages to track the import process

* Change URL for Noto Emoji font in (deprecated) get-fonts.sh script
2025-09-04 16:08:33 +03:00

34 lines
1.5 KiB
Docker

FROM ubuntu:noble
# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
ARG DEBIAN_FRONTEND=noninteractive
# Style dependencies
RUN apt-get update && apt-get install --no-install-recommends -y \
ca-certificates gnupg postgresql-client curl unzip python3 \
nodejs npm git fonts-unifont mapnik-utils \
&& rm -rf /var/lib/apt/lists/*
# Kosmtik with plugins, forcing prefix to /usr because Ubuntu sets
# npm prefix to /usr/local, which breaks the install
# We install kosmtik not from release channel, but directly from a specific commit on github.
# 5dbde8db6b5e22073951066b0646a91c10bb81a5 is master's tip as of 2024-11-17.
RUN npm set prefix /usr && npm install -g --unsafe-perm "git+https://git@github.com/kosmtik/kosmtik.git#5dbde8db6b5e22073951066b0646a91c10bb81a5"
WORKDIR /usr/lib/node_modules/kosmtik/
RUN kosmtik plugins --install kosmtik-overpass-layer \
--install kosmtik-fetch-remote \
--install kosmtik-overlay \
--install kosmtik-open-in-josm \
--install kosmtik-map-compare \
--install kosmtik-osm-data-overlay \
--install kosmtik-mapnik-reference \
--install kosmtik-geojson-overlay \
&& cp /root/.config/kosmtik.yml /tmp/.kosmtik-config.yml
# Closing section
RUN mkdir -p /openstreetmap-carto
WORKDIR /openstreetmap-carto
USER 1000
CMD sh scripts/docker-startup.sh kosmtik