-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sameer Naik
committed
Jul 12, 2018
1 parent
f02df77
commit cf2ba63
Showing
1 changed file
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FROM sameersbn/ubuntu:14.04.20170123 | ||
MAINTAINER [email protected] | ||
FROM ubuntu:xenial-20180525 | ||
LABEL maintainer="[email protected]" | ||
|
||
ENV PG_APP_HOME="/etc/docker-postgresql"\ | ||
ENV PG_APP_HOME="/etc/docker-postgresql" \ | ||
PG_VERSION=9.6 \ | ||
PG_USER=postgres \ | ||
PG_HOME=/var/lib/postgresql \ | ||
|
@@ -12,10 +12,12 @@ ENV PG_APP_HOME="/etc/docker-postgresql"\ | |
ENV PG_BINDIR=/usr/lib/postgresql/${PG_VERSION}/bin \ | ||
PG_DATADIR=${PG_HOME}/${PG_VERSION}/main | ||
|
||
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ | ||
&& echo 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ | ||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y gnupg gnupg-curl \ | ||
&& apt-key adv --fetch-keys https://www.postgresql.org/media/keys/ACCC4CF8.asc \ | ||
&& echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ | ||
&& apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y acl \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y acl sudo \ | ||
postgresql-${PG_VERSION} postgresql-client-${PG_VERSION} postgresql-contrib-${PG_VERSION} \ | ||
&& ln -sf ${PG_DATADIR}/postgresql.conf /etc/postgresql/${PG_VERSION}/main/postgresql.conf \ | ||
&& ln -sf ${PG_DATADIR}/pg_hba.conf /etc/postgresql/${PG_VERSION}/main/pg_hba.conf \ | ||
|
@@ -28,6 +30,5 @@ COPY entrypoint.sh /sbin/entrypoint.sh | |
RUN chmod 755 /sbin/entrypoint.sh | ||
|
||
EXPOSE 5432/tcp | ||
VOLUME ["${PG_HOME}", "${PG_RUNDIR}"] | ||
WORKDIR ${PG_HOME} | ||
ENTRYPOINT ["/sbin/entrypoint.sh"] |