Upgrade image to Debian Stretch, osm-carto 4.8.0, osm-bright 2016-07-25, mod_tile 2017-01-08

master
Vitaliy Filippov 2018-03-10 12:38:42 +03:00
parent be8422a779
commit d7bd7c92c1
5 changed files with 25 additions and 7 deletions

View File

@ -1,19 +1,30 @@
# DOCKER-VERSION 1.3.1
# VERSION 0.1
FROM debian:jessie
FROM debian:stretch
MAINTAINER Maximilian Güntner <maximilian.guentner@gmail.com>
ENV OSM_CARTO_VERSION 2.24.0
ENV OSM_CARTO_VERSION 4.8.0
ENV OSM_BRIGHT_VERSION master
ENV MOD_TILE_VERSION master
ENV PARALLEL_BUILD 4
RUN touch /etc/inittab
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -q autoconf libtool libmapnik-dev apache2-dev curl unzip gdal-bin mapnik-utils node-carto node-millstone apache2 wget runit sudo
ADD etc /etc
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -q libgdal-dev autoconf libtool libmapnik-dev apache2-dev curl unzip gdal-bin mapnik-utils apache2 wget runit sudo
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y ca-certificates gnupg2
RUN curl -L https://deb.nodesource.com/setup_8.x | bash -
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs build-essential gyp
RUN npm install -g --unsafe carto@0.9.5 millstone
RUN cd /tmp && wget https://github.com/gravitystorm/openstreetmap-carto/archive/v$OSM_CARTO_VERSION.tar.gz && tar -xzf v$OSM_CARTO_VERSION.tar.gz
RUN mkdir /usr/share/mapnik && mv /tmp/openstreetmap-carto-$OSM_CARTO_VERSION /usr/share/mapnik/
RUN cd /usr/share/mapnik/openstreetmap-carto-$OSM_CARTO_VERSION/ && ./get-shapefiles.sh && cp project.mml project.mml.orig
RUN cd /usr/share/mapnik/openstreetmap-carto-$OSM_CARTO_VERSION/ && scripts/get-shapefiles.py && cp project.mml project.mml.orig
RUN cd /usr/share/mapnik/openstreetmap-carto-$OSM_CARTO_VERSION/data && \
mkdir -p ne_10m_populated_places && \
cd ne_10m_populated_places && \
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip && \
unzip ne_10m_populated_places.zip && \
rm ne_10m_populated_places.zip && \
shapeindex ne_10m_populated_places.shp
# Delete zip files
RUN find /usr/share/mapnik/openstreetmap-carto-$OSM_CARTO_VERSION/data \( -type f -iname "*.zip" -o -iname "*.tgz" \) -delete

4
etc/apt/apt.conf Normal file
View File

@ -0,0 +1,4 @@
APT::Install-Suggests false;
APT::Install-Recommends false;
Acquire::Retries 5;
Binary::apt::APT::Keep-Downloaded-Packages "false";

0
etc/inittab Normal file
View File

View File

@ -2,7 +2,7 @@
exec 2>&1
source /etc/envvars
sed -i -e "s/{{OSM_CARTO_XML_DIR}}/\/usr\/share\/mapnik\/openstreetmap-carto-$OSM_CARTO_VERSION\/style.xml/" \
-e "s/{{PLUGINS_DIR}}/\/usr\/lib\/mapnik\/2.2\/input\//" \
-e "s/{{PLUGINS_DIR}}/\/usr\/lib\/mapnik\/3.0\/input\//" \
-e "s/{{HOST}}/localhost/" \
/usr/local/etc/renderd.conf
@ -15,6 +15,7 @@ cp project.mml.orig project.mml
sed -i "s/\"dbname\": \"gis\"/\"host\": \"$PG_PORT_5432_TCP_ADDR\",\n \
\"port\": \"$PG_PORT_5432_TCP_PORT\",\n \
\"user\": \"$PG_ENV_OSM_USER\",\n \
\"password\": \"$PG_ENV_OSM_PASSWORD\",\n \
\"dbname\":\"$PG_ENV_OSM_DB\"/" project.mml
carto project.mml > style.xml
@ -26,6 +27,7 @@ sed -i -e "s|^config\[\"path\"\].*|config\[\"path\"\] = \"$(pwd)\"|" \
-e "s/^config\[\"postgis\"\]\[\"host\"\].*/config\[\"postgis\"\]\[\"host\"\] = \"$PG_PORT_5432_TCP_ADDR\"/" \
-e "s/^config\[\"postgis\"\]\[\"port\"\].*/config\[\"postgis\"\]\[\"port\"\] = \"$PG_PORT_5432_TCP_PORT\"/" \
-e "s/^config\[\"postgis\"\]\[\"dbname\"\].*/config\[\"postgis\"\]\[\"dbname\"\] = \"$PG_ENV_OSM_DB\"/" \
-e "s/^config\[\"postgis\"\]\[\"password\"\].*/config\[\"postgis\"\]\[\"password\"\] = \"$PG_ENV_OSM_PASSWORD\"/" \
-e "s/^config\[\"postgis\"\]\[\"user\"\].*/config\[\"postgis\"\]\[\"user\"\] = \"$PG_ENV_OSM_USER\"/" configure.py
./make.py

View File

@ -3,4 +3,5 @@
# so we just save them in a file which we can source from
# run scripts.
export > /etc/envvars
exec /usr/sbin/runsvdir-start
exec /usr/bin/runsvdir /etc/runit/runsvdir/default