Skip to content

Commit 2a95274

Browse files
committed
Use gosu postgres when writing to hba.cnf so that drop-cap dac_override works
1 parent 461b6db commit 2a95274

7 files changed

+7
-7
lines changed

9.1/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if [ "$1" = 'postgres' ]; then
4343
authMethod=trust
4444
fi
4545

46-
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf"
46+
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } | gosu postgres tee -a "$PGDATA/pg_hba.conf" > /dev/null
4747

4848
# internal start of server in order to allow set-up using psql-client
4949
# does not listen on external TCP/IP and waits until start finishes

9.2/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if [ "$1" = 'postgres' ]; then
4343
authMethod=trust
4444
fi
4545

46-
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf"
46+
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } | gosu postgres tee -a "$PGDATA/pg_hba.conf" > /dev/null
4747

4848
# internal start of server in order to allow set-up using psql-client
4949
# does not listen on external TCP/IP and waits until start finishes

9.3/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if [ "$1" = 'postgres' ]; then
4343
authMethod=trust
4444
fi
4545

46-
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf"
46+
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } | gosu postgres tee -a "$PGDATA/pg_hba.conf" > /dev/null
4747

4848
# internal start of server in order to allow set-up using psql-client
4949
# does not listen on external TCP/IP and waits until start finishes

9.4/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if [ "$1" = 'postgres' ]; then
4343
authMethod=trust
4444
fi
4545

46-
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf"
46+
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } | gosu postgres tee -a "$PGDATA/pg_hba.conf" > /dev/null
4747

4848
# internal start of server in order to allow set-up using psql-client
4949
# does not listen on external TCP/IP and waits until start finishes

9.5/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if [ "$1" = 'postgres' ]; then
4343
authMethod=trust
4444
fi
4545

46-
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf"
46+
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } | gosu postgres tee -a "$PGDATA/pg_hba.conf" > /dev/null
4747

4848
# internal start of server in order to allow set-up using psql-client
4949
# does not listen on external TCP/IP and waits until start finishes

9.6/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if [ "$1" = 'postgres' ]; then
4343
authMethod=trust
4444
fi
4545

46-
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf"
46+
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } | gosu postgres tee -a "$PGDATA/pg_hba.conf" > /dev/null
4747

4848
# internal start of server in order to allow set-up using psql-client
4949
# does not listen on external TCP/IP and waits until start finishes

docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if [ "$1" = 'postgres' ]; then
4343
authMethod=trust
4444
fi
4545

46-
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf"
46+
{ echo; echo "host all all 0.0.0.0/0 $authMethod"; } | gosu postgres tee -a "$PGDATA/pg_hba.conf" > /dev/null
4747

4848
# internal start of server in order to allow set-up using psql-client
4949
# does not listen on external TCP/IP and waits until start finishes

0 commit comments

Comments
 (0)