Skip to content

Commit 9375cde

Browse files
committed
Install an explicit version of Postgres
1 parent 77b5f00 commit 9375cde

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

9.3/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' > /etc/
1212
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc \
1313
| apt-key add - ED6D65271AACF0FF15D123036FB2A1C265FFB764
1414

15+
ENV PG_MAJOR 9.3
16+
ENV PG_VERSION 9.3.4-1.pgdg70+1
17+
1518
RUN apt-get update \
1619
&& apt-get install -y postgresql-common \
1720
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
18-
&& apt-get install -y postgresql-9.3
21+
&& apt-get install -y postgresql-$PG_MAJOR=$PG_VERSION
1922

20-
ENV PATH /usr/lib/postgresql/9.3/bin:$PATH
23+
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
2124
ENV PGDATA /var/lib/postgresql/data
2225
VOLUME /var/lib/postgresql/data
2326

0 commit comments

Comments
 (0)