🔨 Updated user command
This commit is contained in:
parent
f9f1047400
commit
62a972736a
23
Dockerfile
23
Dockerfile
@ -88,7 +88,6 @@ RUN wget http://download.osgeo.org/postgis/source/postgis-3.0.0rc2.tar.gz -O pos
|
|||||||
|
|
||||||
# Set up renderer user
|
# Set up renderer user
|
||||||
RUN adduser --disabled-password --gecos "" renderer
|
RUN adduser --disabled-password --gecos "" renderer
|
||||||
USER renderer
|
|
||||||
|
|
||||||
# Install latest osm2pgsql
|
# Install latest osm2pgsql
|
||||||
RUN mkdir -p /home/renderer/src \
|
RUN mkdir -p /home/renderer/src \
|
||||||
@ -103,10 +102,6 @@ RUN mkdir -p /home/renderer/src \
|
|||||||
&& mkdir /nodes \
|
&& mkdir /nodes \
|
||||||
&& chown renderer:renderer /nodes \
|
&& chown renderer:renderer /nodes \
|
||||||
&& rm -rf /home/renderer/src
|
&& rm -rf /home/renderer/src
|
||||||
USER renderer
|
|
||||||
|
|
||||||
# Install and test Mapnik
|
|
||||||
RUN python -c 'import mapnik'
|
|
||||||
|
|
||||||
# Install mod_tile and renderd
|
# Install mod_tile and renderd
|
||||||
RUN mkdir -p /home/renderer/src \
|
RUN mkdir -p /home/renderer/src \
|
||||||
@ -120,29 +115,21 @@ RUN mkdir -p /home/renderer/src \
|
|||||||
&& ldconfig \
|
&& ldconfig \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
&& rm -rf mod_tile
|
&& rm -rf mod_tile
|
||||||
USER renderer
|
|
||||||
|
|
||||||
# Configure stylesheet
|
# Configure stylesheet
|
||||||
RUN mkdir -p /home/renderer/src \
|
RUN mkdir -p /home/renderer/src \
|
||||||
&& git clone https://github.com/gravitystorm/openstreetmap-carto.git \
|
&& git clone https://github.com/gravitystorm/openstreetmap-carto.git \
|
||||||
&& git -C openstreetmap-carto checkout v4.23.0 \
|
&& git -C openstreetmap-carto checkout v4.23.0 \
|
||||||
&& openstreetmap-carto \
|
&& cd openstreetmap-carto \
|
||||||
&& npm install -g carto@0.18.2
|
&& npm install -g carto@0.18.2 \
|
||||||
USER renderer
|
&& carto project.mml > mapnik.xml \
|
||||||
RUN carto project.mml > mapnik.xml
|
&& scripts/get-shapefiles.py
|
||||||
|
|
||||||
# Load shapefiles
|
|
||||||
WORKDIR /home/renderer/src/openstreetmap-carto
|
|
||||||
RUN scripts/get-shapefiles.py
|
|
||||||
|
|
||||||
# Configure renderd
|
# Configure renderd
|
||||||
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 \
|
||||||
&& sed -i 's/hot/tile/g' /usr/local/etc/renderd.conf
|
&& sed -i 's/hot/tile/g' /usr/local/etc/renderd.conf
|
||||||
USER renderer
|
|
||||||
|
|
||||||
# Configure Apache
|
# Configure Apache
|
||||||
USER root
|
|
||||||
RUN mkdir /var/lib/mod_tile \
|
RUN mkdir /var/lib/mod_tile \
|
||||||
&& chown renderer /var/lib/mod_tile \
|
&& chown renderer /var/lib/mod_tile \
|
||||||
&& mkdir /var/run/renderd \
|
&& mkdir /var/run/renderd \
|
||||||
@ -171,7 +158,6 @@ RUN chmod +x /usr/bin/openstreetmap-tiles-update-expire \
|
|||||||
&& echo "* * * * * renderer openstreetmap-tiles-update-expire\n" >> /etc/crontab
|
&& echo "* * * * * renderer openstreetmap-tiles-update-expire\n" >> /etc/crontab
|
||||||
|
|
||||||
# install trim_osc.py helper script
|
# install trim_osc.py helper script
|
||||||
USER renderer
|
|
||||||
RUN cd ~/src \
|
RUN cd ~/src \
|
||||||
&& git clone https://github.com/zverik/regional \
|
&& git clone https://github.com/zverik/regional \
|
||||||
&& cd regional \
|
&& cd regional \
|
||||||
@ -179,7 +165,6 @@ RUN cd ~/src \
|
|||||||
&& chmod u+x ~/src/regional/trim_osc.py
|
&& chmod u+x ~/src/regional/trim_osc.py
|
||||||
|
|
||||||
# Start running
|
# Start running
|
||||||
USER root
|
|
||||||
COPY run.sh /
|
COPY run.sh /
|
||||||
COPY indexes.sql /
|
COPY indexes.sql /
|
||||||
ENTRYPOINT ["/run.sh"]
|
ENTRYPOINT ["/run.sh"]
|
||||||
|
Loading…
Reference in New Issue
Block a user