Mise à jour de la version de postgresql

This commit is contained in:
2025-08-27 08:41:13 +02:00
parent f3d2cc5a7c
commit 791e8aed1f

44
Dockerfile Normal file
View File

@@ -0,0 +1,44 @@
# Étape 1 : builder temporaire pour compiler pgTAP
FROM debian:trixie AS builder
# 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
RUN git clone --depth 1 https://github.com/theory/pgtap.git /usr/src/pgtap && \
cd /usr/src/pgtap && \
make && \
make install DESTDIR=/pgtap-dist
# Étape 2 : image finale PostgreSQL propre
FROM postgres:17.6
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
locales; \
sed -i '/fr_FR.UTF-8/s/^# //' /etc/locale.gen; \
locale-gen
ENV TZ=Europe/Paris
ENV LANG=fr_FR.UTF-8
ENV LANGUAGE=fr_FR:fr
ENV LC_ALL=fr_FR.UTF-8
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
postgresql-postgis
# Copier uniquement les fichiers installés depuis le builder
COPY --from=builder /pgtap-dist/ /
# Scripts init et données
COPY ./docker-entrypoint-initdb.d /docker-entrypoint-initdb.d
COPY ./data /tmp