Ajouter 1.3.CreationDockerfile.postgres.sh
This commit is contained in:
parent
35f886ef67
commit
eb5b749027
1 changed files with 15 additions and 0 deletions
15
1.3.CreationDockerfile.postgres.sh
Normal file
15
1.3.CreationDockerfile.postgres.sh
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
# Création du Dockerfile de Postgresql
|
||||
POSTGRESQL_DIR=./config-postgresql
|
||||
mkdir -p "$POSTGRESQL_DIR"
|
||||
|
||||
cat > "$POSTGRESQL_DIR/Dockerfile" <<EOF
|
||||
# Utiliser l'image officielle PostgreSQL 15
|
||||
FROM postgres:15
|
||||
|
||||
# Changer le port d'écoute dans la configuration PostgreSQL
|
||||
RUN sed -i 's/^#port = 5432/port = $POSTGRESQL_PORT/' /usr/share/postgresql/postgresql.conf.sample
|
||||
|
||||
# Copier la configuration dans le répertoire de configuration PostgreSQL
|
||||
CMD ["postgres", "-c", "config_file=/usr/share/postgresql/postgresql.conf.sample"]
|
||||
EOF
|
||||
Loading…
Reference in a new issue