From 7dd4ba4f7ace5c51ae6929f871fdcd4b41bcbe02 Mon Sep 17 00:00:00 2001 From: Torsten Raudssus Date: Mon, 16 Dec 2024 00:19:02 +0100 Subject: [PATCH 1/2] Updating Healthcheck --- Dockerfile | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 118f038..f979ee2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,4 +58,4 @@ EXPOSE 5432 CMD ["postgres","-c","listen_addresses=*"] HEALTHCHECK --interval=30s --timeout=3s --retries=4 \ - CMD pg_isready -U postgres + CMD pg_isready -U "${POSTGRES_USER:-postgres}" diff --git a/README.md b/README.md index cfff5e3..4778c81 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you use the image, you will have to make a mount for the **/data** directory ### Image Name -The image name for your Docker is **src.ci/srv/postgres:latest**. This is only applicable, if you do not want to change the User ID and Group ID. +The image name for your Docker is **src.ci/srv/postgres:latest**. This is only applicable, if you do not need to change the User ID and Group ID. ### ARGS From 06457d5d4172c4a16107c080c717e276b33424bb Mon Sep 17 00:00:00 2001 From: Torsten Raudssus Date: Wed, 4 Jun 2025 04:38:16 +0200 Subject: [PATCH 2/2] Correcing ENV format --- Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index f979ee2..92efb25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,15 +5,15 @@ ARG SRV_GID="100" ARG SRV_LOCALE="en_US" ARG SRV_VERSION="0" -ENV SRV_UID $SRV_UID -ENV SRV_GID $SRV_GID -ENV SRV_LOCALE $SRV_LOCALE -ENV SRV_VERSION $SRV_VERSION -ENV SRV_APT_GET_INSTALL $SRV_APT_GET_INSTALL +ENV SRV_UID=$SRV_UID +ENV SRV_GID=$SRV_GID +ENV SRV_LOCALE=$SRV_LOCALE +ENV SRV_VERSION=$SRV_VERSION +ENV SRV_APT_GET_INSTALL=$SRV_APT_GET_INSTALL -ENV DEBIAN_FRONTEND "noninteractive" -ENV PGDATA "/data" -ENV POSTGRES_INITDB_ARGS "--locale=${SRV_LOCALE}.UTF-8 --lc-ctype=${SRV_LOCALE}.UTF-8 --lc-monetary=${SRV_LOCALE}.UTF-8 --lc-numeric=${SRV_LOCALE}.UTF-8 --lc-time=${SRV_LOCALE}.UTF-8 --lc-collate=${SRV_LOCALE}.UTF-8 --encoding=UTF8" +ENV DEBIAN_FRONTEND="noninteractive" +ENV PGDATA="/data" +ENV POSTGRES_INITDB_ARGS="--locale=${SRV_LOCALE}.UTF-8 --lc-ctype=${SRV_LOCALE}.UTF-8 --lc-monetary=${SRV_LOCALE}.UTF-8 --lc-numeric=${SRV_LOCALE}.UTF-8 --lc-time=${SRV_LOCALE}.UTF-8 --lc-collate=${SRV_LOCALE}.UTF-8 --encoding=UTF8" # explicitly set user/group IDs RUN if [ -z "$( getent group $SRV_GID )" ] ; then groupadd -r postgres --gid=$SRV_GID ; fi && \