From c0654192695f9af86f6cf8a0657f9b480ce9097f Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Sun, 12 Jul 2015 23:13:13 +0530 Subject: [PATCH] dockerfile: moved main script variables to `Dockerfile` --- Dockerfile | 7 ++++++- start | 6 ------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2e7234f..f81e9b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,12 @@ FROM sameersbn/ubuntu:14.04.20150712 MAINTAINER sameer@damagehead.com ENV PG_VERSION=9.4 \ - PG_USER=postgres + PG_USER=postgres \ + PG_HOME="/var/lib/postgresql" + +ENV PG_CONFDIR="/etc/postgresql/${PG_VERSION}/main" \ + 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 \ diff --git a/start b/start index 202275e..65e3fac 100755 --- a/start +++ b/start @@ -1,12 +1,6 @@ #!/bin/bash set -e -PG_HOME="/var/lib/postgresql" -PG_CONFDIR="/etc/postgresql/${PG_VERSION}/main" -PG_BINDIR="/usr/lib/postgresql/${PG_VERSION}/bin" -PG_DATADIR="${PG_HOME}/${PG_VERSION}/main" -PG_ARCHIVEDIR="${PG_HOME}/${PG_VERSION}/archive" - # set this env variable to true to enable a line in the # pg_hba.conf file to trust samenet. this can be used to connect # from other containers on the same host without authentication