forked from krvax/marcogeo-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (28 loc) · 1018 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM postgres:9.5
MAINTAINER Jorge Martínez "[email protected]"
ENV POSTGIS_MAJOR 2.2
ENV POSTGIS_VERSION 2.2.1+dfsg-2.pgdg80+1
RUN apt-get update && \
apt-get install -y --no-install-recommends \
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \
postgis=$POSTGIS_VERSION && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install -y \
wget \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /docker-entrypoint-initdb.d &&\
mkdir -p /data
COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh
COPY docker-entrypoint.sh /
RUN wget http://mapserver.inegi.org.mx/MGN/mge2014v6_2.zip && \
wget http://mapserver.inegi.org.mx/MGN/mgm2014v6_2.zip && \
wget http://mapserver.inegi.org.mx/MGN/mglu2014v6_2.zip && \
wget http://mapserver.inegi.org.mx/MGN/mglr2014v6_2.zip && \
mv mg*2014*.zip /data/ && \
cd /data/ && \
for i in `ls -1`;do unzip $i; rm $i; done
ENTRYPOINT ["/docker-entrypoint.sh"]
EXPOSE 5432
CMD ["postgres"]