2014-05-04 19:14:46 +00:00
|
|
|
#--------- Generic stuff all our Dockerfiles should start with so we get caching ------------
|
2019-07-30 07:50:52 +00:00
|
|
|
ARG IMAGE_VERSION=buster
|
|
|
|
FROM debian:$IMAGE_VERSION
|
2014-10-20 05:46:56 +00:00
|
|
|
MAINTAINER Tim Sutton<tim@kartoza.com>
|
2014-05-04 19:14:46 +00:00
|
|
|
|
2019-07-30 07:50:52 +00:00
|
|
|
# Reset ARG for version
|
|
|
|
ARG IMAGE_VERSION
|
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
|
|
|
|
|
2018-03-21 20:53:39 +00:00
|
|
|
RUN apt-get -y update; apt-get -y install gnupg2 wget ca-certificates rpl pwgen
|
2019-01-30 19:06:28 +00:00
|
|
|
|
2019-08-23 13:43:58 +00:00
|
|
|
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ ${IMAGE_VERSION}-pgdg main" > /etc/apt/sources.list.d/postgresql.list'
|
|
|
|
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc -O- | 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:
|
2019-07-30 08:49:56 +00:00
|
|
|
RUN apt-get update; apt-get install -y postgresql-client-11 postgresql-common postgresql-11 postgresql-11-postgis-2.5 postgresql-11-pgrouting netcat postgresql-11-ogr-fdw
|
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.
|
2018-03-21 20:53:39 +00:00
|
|
|
ADD env-data.sh /env-data.sh
|
2014-05-04 19:14:46 +00:00
|
|
|
ADD setup.sh /setup.sh
|
2018-03-21 20:53:39 +00:00
|
|
|
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
|
2018-03-21 20:53:39 +00:00
|
|
|
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
|
|
|
|
|
2019-09-06 11:47:42 +00:00
|
|
|
ADD locale.gen /etc/locale.gen
|
|
|
|
RUN /usr/sbin/locale-gen
|
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
ENV LANGUAGE en_US:en
|
|
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
RUN update-locale ${LANG}
|
2018-03-21 20:53:39 +00:00
|
|
|
|
|
|
|
ENTRYPOINT /docker-entrypoint.sh
|