From adf293ff54a59d38410e80ce874f1c90cc51d179 Mon Sep 17 00:00:00 2001 From: Andy Pfister Date: Fri, 27 Sep 2024 12:59:42 +0200 Subject: [PATCH] Postgres on Alpine now also uses gosu see here: https://github.com/docker-library/postgres/commit/3e9b4eaaebf00d7a8ece67f02e2d6546402f4de7 --- docker-entrypoint.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index fffaa35..75fccc5 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -319,13 +319,7 @@ _main() { # setup data directories and permissions (when run as root) docker_create_db_directories if [ "$(id -u)" = '0' ]; then - if [ -f /etc/alpine-release ]; then - # If running on Alpine, use su-exec - exec su-exec postgres "$BASH_SOURCE" "$@" - else - # Otherwise, use gosu - exec gosu postgres "$BASH_SOURCE" "$@" - fi + exec gosu postgres "$BASH_SOURCE" "$@" fi # only run initialization on an empty data directory