Skip to content

Instantly share code, notes, and snippets.

@johngian
Last active August 30, 2024 16:37
Show Gist options
  • Save johngian/647009421ff675da2c4bb0eac9d18806 to your computer and use it in GitHub Desktop.
Save johngian/647009421ff675da2c4bb0eac9d18806 to your computer and use it in GitHub Desktop.
Build mapnik and node-mapnik from source
FROM debian:bookworm
RUN apt-get update
RUN apt-get install -y build-essential python3 libboost-all-dev libharfbuzz-dev \
libtiff-dev libicu-dev zlib1g-dev libfreetype-dev libxml2-dev libpng-dev \
libwebp-dev libproj-dev libcairo2-dev python3 python3-dev git libjpeg-dev libgdal-dev \
nodejs npm
RUN git clone https://github.com/mapnik/mapnik.git /srv/mapnik
RUN git clone https://github.com/mapnik/node-mapnik /srv/node-mapnik
WORKDIR /srv/mapnik
RUN git checkout v4.0.2
RUN git submodule update --init
RUN python3 ./scons/scons.py configure
RUN python3 ./scons/scons.py install -j8
WORKDIR /srv/node-mapnik
RUN git checkout v4.6.0
RUN git submodule update --init
RUN npm run prebuildify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment