Skip to content

Commit

Permalink
Postgres on Alpine now also uses gosu
Browse files Browse the repository at this point in the history
  • Loading branch information
andyundso committed Sep 27, 2024
1 parent 4a13751 commit adf293f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit adf293f

Please sign in to comment.