Skip to content

Commit 13d3f01

Browse files
committed
Fix PostgreSQL installation
Missing target version was omitting postgresql 16 from the image and copying /usr/pgsql-* copies the dir contents which is not what we want. Currently hardcoding the list of versions in the dockerfile. A proper fix might be to just copy whole /usr into a temp location and use a shell script to pick out stuff we need, remove the temp afterwards.
1 parent 8ce1926 commit 13d3f01

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pgbackrest-build:
5858
--build-arg BUILD=$(BUILD) \
5959
--build-arg PGBACKREST_VERSION=$(PGBACKREST_VERSION) \
6060
--build-arg OLD_PG_VERSIONS="$(OLD_PG_VERSIONS)" \
61-
--build-arg PGVERSION
61+
--build-arg PGVERSION=$(PGVERSION)
6262

6363
pgbackrest: pgbackrest-build;
6464

docker/pgbackrest/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ COPY --from=builder /usr/share/licenses/pgbackrest/LICENSE /usr/share/licenses/p
5757
COPY --from=builder /var/lib/pgbackrest /var/lib/pgbackrest
5858
COPY --from=builder /var/log/pgbackrest /var/log/pgbackrest
5959
# Postgres
60-
COPY --from=builder /usr/pgsql-* /usr/pgsql-*
6160
COPY --from=builder /var/lib/pgsql /var/lib/pgsql
6261
COPY --from=builder ./kubectl /usr/local/bin/
6362
# lz4
@@ -72,7 +71,11 @@ COPY --from=builder /usr/share/locale /usr/share/locale
7271
COPY --from=builder /usr/lib /usr/lib
7372
COPY --from=builder /usr/lib64 /usr/lib64
7473
# PostgreSQL
75-
COPY --from=builder /usr/pgsql-* /usr/
74+
# TODO: implement a method that works with $PG_SUPPORTED_VERSIONS
75+
COPY --from=builder /usr/pgsql-13 /usr/pgsql-13
76+
COPY --from=builder /usr/pgsql-14 /usr/pgsql-14
77+
COPY --from=builder /usr/pgsql-15 /usr/pgsql-15
78+
COPY --from=builder /usr/pgsql-16 /usr/pgsql-16
7679
COPY --from=builder /var/lib/pgsql /var/lib/pgsql
7780
COPY --from=builder /usr/bin/pg_* /usr/bin/
7881

0 commit comments

Comments
 (0)