Skip to content

Commit

Permalink
switch to ubuntu:xenial-20180525
Browse files Browse the repository at this point in the history
  • Loading branch information
Sameer Naik committed Jul 12, 2018
1 parent f02df77 commit cf2ba63
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Dockerfile
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 \
Expand All @@ -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 \
Expand All @@ -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"]

0 comments on commit cf2ba63

Please sign in to comment.