apt-get dependency cleanup
This commit is contained in:
parent
95e5fa8a96
commit
dbbe98aaed
79
Dockerfile
79
Dockerfile
@ -4,7 +4,63 @@ FROM ubuntu:18.04
|
|||||||
# https://switch2osm.org/manually-building-a-tile-server-18-04-lts/
|
# https://switch2osm.org/manually-building-a-tile-server-18-04-lts/
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apt-get update && apt-get install -y libboost-all-dev git-core tar unzip wget bzip2 build-essential autoconf libtool libxml2-dev libgeos-dev libgeos++-dev libpq-dev libbz2-dev libproj-dev munin-node munin libprotobuf-c0-dev protobuf-c-compiler libfreetype6-dev libtiff5-dev libicu-dev libgdal-dev libcairo-dev libcairomm-1.0-dev apache2 apache2-dev libagg-dev liblua5.2-dev ttf-unifont lua5.1 liblua5.1-dev libgeotiff-epsg
|
RUN apt-get update && apt-get install -y \
|
||||||
|
apache2 \
|
||||||
|
apache2-dev \
|
||||||
|
autoconf \
|
||||||
|
build-essential \
|
||||||
|
bzip2 \
|
||||||
|
cmake \
|
||||||
|
fonts-noto-cjk \
|
||||||
|
fonts-noto-hinted \
|
||||||
|
fonts-noto-unhinted \
|
||||||
|
g++ \
|
||||||
|
gdal-bin \
|
||||||
|
git-core \
|
||||||
|
libagg-dev \
|
||||||
|
libboost-all-dev \
|
||||||
|
libboost-dev \
|
||||||
|
libboost-filesystem-dev \
|
||||||
|
libboost-system-dev \
|
||||||
|
libbz2-dev \
|
||||||
|
libcairo-dev \
|
||||||
|
libcairomm-1.0-dev \
|
||||||
|
libexpat1-dev \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libgdal-dev \
|
||||||
|
libgeos++-dev \
|
||||||
|
libgeos-dev \
|
||||||
|
libgeotiff-epsg \
|
||||||
|
libicu-dev \
|
||||||
|
liblua5.1-dev \
|
||||||
|
liblua5.2-dev \
|
||||||
|
libmapnik-dev \
|
||||||
|
libpq-dev \
|
||||||
|
libproj-dev \
|
||||||
|
libprotobuf-c0-dev \
|
||||||
|
libtiff5-dev \
|
||||||
|
libtool \
|
||||||
|
libxml2-dev \
|
||||||
|
lua5.1 \
|
||||||
|
lua5.2 \
|
||||||
|
make \
|
||||||
|
mapnik-utils \
|
||||||
|
munin \
|
||||||
|
munin-node \
|
||||||
|
nodejs \
|
||||||
|
npm \
|
||||||
|
postgis \
|
||||||
|
postgresql \
|
||||||
|
postgresql-10-postgis-2.4 \
|
||||||
|
postgresql-contrib \
|
||||||
|
protobuf-c-compiler \
|
||||||
|
python-mapnik \
|
||||||
|
sudo \
|
||||||
|
tar \
|
||||||
|
ttf-unifont \
|
||||||
|
unzip \
|
||||||
|
wget \
|
||||||
|
zlib1g-dev
|
||||||
|
|
||||||
# Set up environment and renderer user
|
# Set up environment and renderer user
|
||||||
ENV TZ=UTC
|
ENV TZ=UTC
|
||||||
@ -17,9 +73,6 @@ RUN mkdir /home/renderer/src
|
|||||||
WORKDIR /home/renderer/src
|
WORKDIR /home/renderer/src
|
||||||
RUN git clone https://github.com/openstreetmap/osm2pgsql.git
|
RUN git clone https://github.com/openstreetmap/osm2pgsql.git
|
||||||
WORKDIR /home/renderer/src/osm2pgsql
|
WORKDIR /home/renderer/src/osm2pgsql
|
||||||
USER root
|
|
||||||
RUN apt-get install -y make cmake g++ libboost-dev libboost-system-dev libboost-filesystem-dev libexpat1-dev zlib1g-dev libbz2-dev libpq-dev libgeos-dev libgeos++-dev libproj-dev lua5.2 liblua5.2-dev
|
|
||||||
USER renderer
|
|
||||||
RUN mkdir build
|
RUN mkdir build
|
||||||
WORKDIR /home/renderer/src/osm2pgsql/build
|
WORKDIR /home/renderer/src/osm2pgsql/build
|
||||||
RUN cmake ..
|
RUN cmake ..
|
||||||
@ -29,9 +82,6 @@ RUN make install
|
|||||||
USER renderer
|
USER renderer
|
||||||
|
|
||||||
# Install and test Mapnik
|
# Install and test Mapnik
|
||||||
USER root
|
|
||||||
RUN apt-get -y install autoconf apache2-dev libtool libxml2-dev libbz2-dev libgeos-dev libgeos++-dev libproj-dev gdal-bin libmapnik-dev mapnik-utils python-mapnik
|
|
||||||
USER renderer
|
|
||||||
RUN python -c 'import mapnik'
|
RUN python -c 'import mapnik'
|
||||||
|
|
||||||
# Install mod_tile and renderd
|
# Install mod_tile and renderd
|
||||||
@ -52,7 +102,6 @@ WORKDIR /home/renderer/src
|
|||||||
RUN git clone https://github.com/gravitystorm/openstreetmap-carto.git
|
RUN git clone https://github.com/gravitystorm/openstreetmap-carto.git
|
||||||
WORKDIR /home/renderer/src/openstreetmap-carto
|
WORKDIR /home/renderer/src/openstreetmap-carto
|
||||||
USER root
|
USER root
|
||||||
RUN apt-get install -y npm nodejs
|
|
||||||
RUN npm install -g carto
|
RUN npm install -g carto
|
||||||
USER renderer
|
USER renderer
|
||||||
RUN carto -v
|
RUN carto -v
|
||||||
@ -62,11 +111,6 @@ RUN carto project.mml > mapnik.xml
|
|||||||
WORKDIR /home/renderer/src/openstreetmap-carto
|
WORKDIR /home/renderer/src/openstreetmap-carto
|
||||||
RUN scripts/get-shapefiles.py
|
RUN scripts/get-shapefiles.py
|
||||||
|
|
||||||
# Install fonts
|
|
||||||
USER root
|
|
||||||
RUN apt-get install -y fonts-noto-cjk fonts-noto-hinted fonts-noto-unhinted ttf-unifont
|
|
||||||
USER renderer
|
|
||||||
|
|
||||||
# Configure renderd
|
# Configure renderd
|
||||||
USER root
|
USER root
|
||||||
RUN sed -i 's/renderaccount/renderer/g' /usr/local/etc/renderd.conf
|
RUN sed -i 's/renderaccount/renderer/g' /usr/local/etc/renderd.conf
|
||||||
@ -84,16 +128,7 @@ RUN a2enconf mod_tile
|
|||||||
COPY apache.conf /etc/apache2/sites-available/000-default.conf
|
COPY apache.conf /etc/apache2/sites-available/000-default.conf
|
||||||
COPY leaflet-demo.html /var/www/html/index.html
|
COPY leaflet-demo.html /var/www/html/index.html
|
||||||
|
|
||||||
USER renderer
|
|
||||||
|
|
||||||
# Install PostgreSQL
|
|
||||||
USER root
|
|
||||||
RUN apt-get install -y postgresql postgresql-contrib postgis postgresql-10-postgis-2.4
|
|
||||||
USER renderer
|
|
||||||
|
|
||||||
# Start running
|
# Start running
|
||||||
USER root
|
|
||||||
RUN apt-get install -y sudo
|
|
||||||
COPY run.sh /
|
COPY run.sh /
|
||||||
ENTRYPOINT ["/run.sh"]
|
ENTRYPOINT ["/run.sh"]
|
||||||
CMD []
|
CMD []
|
||||||
|
Loading…
Reference in New Issue
Block a user