kopia lustrzana https://github.com/kartoza/docker-postgis
added EXTRA_CONF for 9.6-2.4 (#208)
* added EXTRA_CONF https://github.com/kartoza/docker-postgis/issues/207 * added EXTRA_CONF https://github.com/kartoza/docker-postgis/issues/207 * added EXTRA_CONF https://github.com/kartoza/docker-postgis/issues/207 * added install script * added working example based on ubunty 18.04 * additional block inot needed9.6-2.4
rodzic
cd66269f22
commit
c4f0077136
17
Dockerfile
17
Dockerfile
|
@ -2,17 +2,18 @@
|
|||
FROM debian:stable
|
||||
MAINTAINER Tim Sutton<tim@kartoza.com>
|
||||
|
||||
RUN apt -y update; apt -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 -
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get -y update && \
|
||||
apt-get -y install lsb-release wget software-properties-common gnupg2 && \
|
||||
sh -c 'echo OS: `lsb_release -cs`'
|
||||
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' && \
|
||||
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
||||
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install postgresql-9.6
|
||||
RUN apt-get -y install postgresql-client-9.6 postgresql-common postgresql-9.6-postgis-2.4 postgresql-9.6-pgrouting netcat
|
||||
|
||||
#-------------Application Specific Stuff ----------------------------------------------------
|
||||
|
||||
# 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 -y update; apt install -y postgresql-client-9.6 postgresql-common postgresql-9.6 postgresql-9.6-postgis-2.4 postgresql-9.6-pgrouting netcat
|
||||
|
||||
# Open port 5432 so linked containers can see them
|
||||
EXPOSE 5432
|
||||
|
||||
|
|
|
@ -108,6 +108,11 @@ PostgreSQL listens to you can define it with the following environment variable.
|
|||
all connections.
|
||||
* -e IP_LIST=<*>
|
||||
|
||||
#### Additional configuration
|
||||
|
||||
You can also define any other configuration to add to `postgres.conf`, separated by '\n' e.g.:
|
||||
|
||||
* `-e EXTRA_CONF="log_destination = 'stderr'\nlogging_collector = on"`
|
||||
|
||||
|
||||
## Convenience docker-compose.yml
|
||||
|
|
|
@ -66,3 +66,7 @@ fi
|
|||
if [ ! -z "$POSTGRES_DB" ]; then
|
||||
POSTGRES_DBNAME=${POSTGRES_DB}
|
||||
fi
|
||||
|
||||
if [ -z "$EXTRA_CONF" ]; then
|
||||
EXTRA_CONF=""
|
||||
fi
|
||||
|
|
|
@ -28,3 +28,4 @@ EOF
|
|||
echo "kernel.shmmax=543252480" >> /etc/sysctl.conf
|
||||
echo "kernel.shmall=2097152" >> /etc/sysctl.conf
|
||||
|
||||
echo -e $EXTRA_CONF >> $CONF
|
||||
|
|
Ładowanie…
Reference in New Issue