postgresql 18

This commit is contained in:
2025-10-05 19:16:58 +02:00
parent 52241d96b7
commit 5d5e882e56
3 changed files with 41 additions and 26 deletions

View File

@@ -1,4 +1,4 @@
FROM debian:trixie AS build-essential
FROM debian:forky AS build-essential
RUN set -eux; \
apt-get update; \
@@ -10,6 +10,7 @@ RUN set -eux; \
build-essential \
cmake \
checkinstall \
ca-certificates \
;
FROM build-essential AS build-pgdev
@@ -17,21 +18,18 @@ FROM build-essential AS build-pgdev
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
postgresql-server-dev-17 \
postgresql-server-dev-18 \
;
# =============================================================================
# pgTAP
#
FROM debian:trixie AS pgtap
FROM build-pgdev AS pgtap
# Installer les outils nécessaires pour compiler pgTAP
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
build-essential \
ca-certificates \
postgresql-server-dev-17 \
make
# Cloner et compiler pgTAP
@@ -96,7 +94,7 @@ RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc
#
FROM build-pgdev AS pgvector
ARG pgvector_release=0.6.2
ARG pgvector_release=0.8.1
ADD "https://github.com/pgvector/pgvector/archive/refs/tags/v${pgvector_release}.tar.gz" \
/tmp/pgvector.tar.gz
@@ -115,7 +113,7 @@ RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp \
# =============================================================================
# Étape 3 : image finale PostgreSQL propre
#
FROM postgres:17.6
FROM postgres:18-trixie
RUN set -eux; \
apt-get update; \
@@ -124,15 +122,27 @@ RUN set -eux; \
sed -i '/fr_FR.UTF-8/s/^# //' /etc/locale.gen; \
locale-gen
RUN localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8
ENV TZ=Europe/Paris
ENV LANG=fr_FR.UTF-8
ENV LANGUAGE=fr_FR:fr
ENV LC_ALL=fr_FR.UTF-8
ENV POSTGIS_MAJOR=3
ENV POSTGIS_VERSION=3.6.0+dfsg-1.pgdg13+1
RUN set -eux; \
apt-get update; \
apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR; \
apt-get install -y --no-install-recommends \
postgresql-postgis
# ca-certificates: for accessing remote raster files;
# fix: https://github.com/postgis/docker-postgis/issues/307
ca-certificates \
\
postgresql-18-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \
postgresql-18-postgis-$POSTGIS_MAJOR-scripts; \
rm -rf /var/lib/apt/lists/*
# Copier uniquement les fichiers installés depuis le builder
COPY --from=pgtap /pgtap-dist/ /