From 9608950c6001b96dfcedbec7cd3b2169fe0960a9 Mon Sep 17 00:00:00 2001 From: Gaspard Wierzbinski Date: Fri, 18 Oct 2024 14:13:14 +0200 Subject: [PATCH] =?UTF-8?q?chore:=20=E2=AC=86=EF=B8=8F=20Upgrade=20Postgre?= =?UTF-8?q?s=20version=20to=2017?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3046e74..ac372ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM postgres:16-alpine AS env-build +FROM postgres:17-alpine AS env-build RUN apk add --no-cache build-base postgresql-dev git @@ -8,14 +8,14 @@ RUN git clone https://github.com/fboulnois/pg_uuidv7.git . COPY pg_buildext . # build extension for all supported versions -RUN /bin/sh pg_buildext build-16 16 +RUN /bin/sh pg_buildext build-17 17 # create tarball and checksums -RUN cp sql/pg_uuidv7--1.5.sql . && TARGETS=$(find * -name pg_uuidv7.so) \ - && tar -czvf pg_uuidv7.tar.gz $TARGETS pg_uuidv7--1.5.sql pg_uuidv7.control \ - && sha256sum pg_uuidv7.tar.gz $TARGETS pg_uuidv7--1.5.sql pg_uuidv7.control > SHA256SUMS +RUN cp sql/pg_uuidv7--1.6.sql . && TARGETS=$(find * -name pg_uuidv7.so) \ + && tar -czvf pg_uuidv7.tar.gz $TARGETS pg_uuidv7--1.6.sql pg_uuidv7.control \ + && sha256sum pg_uuidv7.tar.gz $TARGETS pg_uuidv7--1.6.sql pg_uuidv7.control > SHA256SUMS -FROM postgres:16-alpine AS env-deploy +FROM postgres:17-alpine AS env-deploy # copy tarball and checksums COPY --from=0 /srv/pg_uuidv7.tar.gz /srv/SHA256SUMS /srv/ @@ -23,7 +23,7 @@ COPY --from=0 /srv/pg_uuidv7.tar.gz /srv/SHA256SUMS /srv/ # add extension to postgres COPY --from=0 /srv/${PG_MAJOR}/pg_uuidv7.so /usr/local/lib/postgresql/pg_uuidv7 COPY --from=0 /srv/pg_uuidv7.control /usr/local/share/postgresql/extension -COPY --from=0 /srv/pg_uuidv7--1.5.sql /usr/local/share/postgresql/extension +COPY --from=0 /srv/pg_uuidv7--1.6.sql /usr/local/share/postgresql/extension # Add a script to run the CREATE EXTENSION command RUN printf '#!/bin/sh\npsql -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION pg_uuidv7;"' > /docker-entrypoint-initdb.d/init.sh