From b4e60794bb9a2eec0904ceb6e3ad14320a44666a Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Sun, 13 Feb 2022 09:24:05 +0100 Subject: [PATCH] switch to s6-rc --- Dockerfile | 1 - rootfs/bin/initdb | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d0b91b4..78173db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ FROM thallian/confd-env:latest ENV PGDATA=/var/lib/postgresql/data -ENV S6_KEEP_ENV=1 RUN apk add --no-cache \ postgresql14 \ diff --git a/rootfs/bin/initdb b/rootfs/bin/initdb index c4412d3..ea0a192 100755 --- a/rootfs/bin/initdb +++ b/rootfs/bin/initdb @@ -1,5 +1,5 @@ #!/command/with-contenv sh -if [ ! -f "/var/lib/postgresql/data/PG_VERSION" ]; then - s6-setuidgid postgres initdb --username=postgres +if [ ! -f "$PGDATA/PG_VERSION" ]; then + initdb --username=postgres fi