mirror of
https://github.com/wassname/docker-postgresql.git
synced 2026-09-12 12:21:21 +08:00
dockerfile: define PG_VERSION as an ENV variable
This commit is contained in:
+2
-1
@@ -1,10 +1,11 @@
|
|||||||
FROM sameersbn/ubuntu:14.04.20150120
|
FROM sameersbn/ubuntu:14.04.20150120
|
||||||
MAINTAINER sameer@damagehead.com
|
MAINTAINER sameer@damagehead.com
|
||||||
|
|
||||||
|
ENV PG_VERSION 9.1
|
||||||
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
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 \
|
&& echo 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y postgresql-9.1 postgresql-client-9.1 pwgen \
|
&& apt-get install -y postgresql-${PG_VERSION} postgresql-client-${PG_VERSION} pwgen \
|
||||||
&& rm -rf /var/lib/postgresql \
|
&& rm -rf /var/lib/postgresql \
|
||||||
&& rm -rf /var/lib/apt/lists/* # 20141001
|
&& rm -rf /var/lib/apt/lists/* # 20141001
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
PG_VERSION="9.1"
|
|
||||||
PG_CONFDIR="/etc/postgresql/${PG_VERSION}/main"
|
PG_CONFDIR="/etc/postgresql/${PG_VERSION}/main"
|
||||||
PG_BINDIR="/usr/lib/postgresql/${PG_VERSION}/bin"
|
PG_BINDIR="/usr/lib/postgresql/${PG_VERSION}/bin"
|
||||||
PG_DATADIR="/var/lib/postgresql/${PG_VERSION}/main"
|
PG_DATADIR="/var/lib/postgresql/${PG_VERSION}/main"
|
||||||
|
|||||||
Reference in New Issue
Block a user