File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,15 @@ ARG POSTGRES_VERSION=latest
2
2
3
3
FROM postgres:$POSTGRES_VERSION
4
4
5
+ ENV POSTGRES_VERSION=$POSTGRES_VERSION
6
+
5
7
RUN apt-get update
6
8
RUN apt-mark hold locales
7
9
RUN apt-get install curl ca-certificates -y
8
10
RUN install -d /usr/share/postgresql-common/pgdg
9
11
RUN curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
10
12
RUN sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
11
13
RUN apt-get update
12
- RUN apt-get install postgresql-server-dev-16 -y
13
- RUN sh -c 'export PATH=/usr/lib/postgresql/16 /bin:$PATH'
14
- RUN apt-get install postgresql-16 -wal2json -y
14
+ RUN apt-get install postgresql-server-dev-${POSTGRES_VERSION} -y
15
+ RUN sh -c 'export PATH=/usr/lib/postgresql/${POSTGRES_VERSION} /bin:$PATH'
16
+ RUN apt-get install postgresql-${POSTGRES_VERSION} -wal2json -y
You can’t perform that action at this time.
0 commit comments