Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Dockerfile.rocky8
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ COPY docker-entrypoint.sh /
COPY check-container /usr/libexec/
RUN chmod a+xr /docker-entrypoint.sh \
&& usermod -a -G root postgres \
&& chgrp -R root "/var/lib/pgsql/" \
&& chmod g+rwX "/var/lib/pgsql/" \
&& chgrp -R root "/var/run/postgresql" \
&& chmod g+rw "/var/run/postgresql" \
&& chmod ug+x "/usr/libexec/check-container" \
;
Expand Down
5 changes: 3 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PGCTL="/usr/pgsql-14/bin/pg_ctl"

if [ -f "${PGDATA}initialized" ]; then
echo "Database already initialized" 1>&2
chmod -R 0700 "$PGDATA"
chmod -R 0770 "$PGDATA"
else
# REQUIRED VARS CHECK
[[ -z "${POSTGRESQL_DATABASE}" || "${POSTGRESQL_DATABASE}" == *'"'* ]] && {
Expand All @@ -33,7 +33,8 @@ else
[ ! -d "$PGDATA" ] && {
LANG=${LANG:-en_US.utf8} /usr/pgsql-14/bin/initdb -D "$PGDATA" --username "$PGUSER"
}
chmod -R 0700 "$PGDATA"

chmod -R 0770 "$PGDATA"

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