docker-postgis/Dockerfile

43 wiersze
1.5 KiB
Docker
Czysty Zwykły widok Historia

2014-05-04 19:14:46 +00:00
#--------- Generic stuff all our Dockerfiles should start with so we get caching ------------
2015-08-11 21:54:59 +00:00
FROM debian:stable
2014-10-20 05:46:56 +00:00
MAINTAINER Tim Sutton<tim@kartoza.com>
2014-05-04 19:14:46 +00:00
RUN export DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND noninteractive
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN apt-get -y update; apt-get -y install gnupg2 wget ca-certificates rpl pwgen
2017-10-21 20:01:55 +00:00
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
2014-05-04 19:14:46 +00:00
#-------------Application Specific Stuff ----------------------------------------------------
2015-08-08 21:46:13 +00:00
# We add postgis as well to prevent build errors (that we dont see on local builds)
# on docker hub e.g.
# The following packages have unmet dependencies:
RUN apt-get update; apt-get install -y postgresql-client-11 postgresql-common postgresql-11 postgresql-11-postgis-2.5 postgresql-11-pgrouting netcat
2014-05-04 19:14:46 +00:00
# Open port 5432 so linked containers can see them
2014-05-04 19:14:46 +00:00
EXPOSE 5432
# Run any additional tasks here that are too tedious to put in
# this dockerfile directly.
ADD env-data.sh /env-data.sh
2014-05-04 19:14:46 +00:00
ADD setup.sh /setup.sh
RUN chmod +x /setup.sh
2014-05-04 19:14:46 +00:00
RUN /setup.sh
# We will run any commands in this when the container starts
ADD docker-entrypoint.sh /docker-entrypoint.sh
ADD setup-conf.sh /
ADD setup-database.sh /
ADD setup-pg_hba.sh /
ADD setup-replication.sh /
ADD setup-ssl.sh /
ADD setup-user.sh /
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT /docker-entrypoint.sh