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
|
|
|
|
|
2017-10-20 21:06:45 +00:00
|
|
|
RUN apt-get -y update
|
2017-10-21 20:01:55 +00:00
|
|
|
RUN apt-get -y install gnupg2 wget ca-certificates rpl pwgen
|
|
|
|
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
|
|
|
RUN apt-get -y update
|
2017-10-21 20:01:55 +00:00
|
|
|
#RUN apt-get -y upgrade
|
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:
|
2018-02-08 09:29:30 +00:00
|
|
|
RUN apt-get install -y postgresql-client-10 postgresql-common postgresql-10 postgresql-10-postgis-2.4 postgresql-10-pgrouting netcat
|
2014-05-04 19:14:46 +00:00
|
|
|
|
2014-08-05 08:45:28 +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 setup.sh /setup.sh
|
|
|
|
RUN chmod 0755 /setup.sh
|
|
|
|
RUN /setup.sh
|
|
|
|
|
|
|
|
# We will run any commands in this when the container starts
|
|
|
|
ADD start-postgis.sh /start-postgis.sh
|
|
|
|
RUN chmod 0755 /start-postgis.sh
|
|
|
|
|
2014-12-06 07:09:58 +00:00
|
|
|
CMD /start-postgis.sh
|