File tree Expand file tree Collapse file tree
root/etc/services.d/postgresql Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ LABEL org.opencontainers.image.title="PostgreSQL ${PG_VERSION}" \
2020 io.daemonless.arch="${FREEBSD_ARCH}" \
2121 io.daemonless.category="Databases" \
2222 io.daemonless.upstream-url="${UPSTREAM_URL}" \
23- io.daemonless.packages="${PACKAGES}"
23+ io.daemonless.packages="${PACKAGES}" \
24+ org.freebsd.jail.allow.sysvipc="required"
2425
2526# Install PostgreSQL
2627RUN pkg update && \
Original file line number Diff line number Diff line change @@ -17,16 +17,16 @@ if [ ! -f "$PGDATA/PG_VERSION" ]; then
1717
1818 # Configure authentication method (default: scram-sha-256)
1919 AUTH_METHOD=" ${POSTGRES_HOST_AUTH_METHOD:- scram-sha-256} "
20- echo " host all all 0.0.0.0/0 $AUTH_METHOD " >> " $PGDATA /pg_hba.conf"
21- echo " host all all ::/0 $AUTH_METHOD " >> " $PGDATA /pg_hba.conf"
22- echo " local all all trust" >> " $PGDATA /pg_hba.conf"
20+ /usr/local/bin/s6-setuidgid bsd sh -c " echo ' host all all 0.0.0.0/0 $AUTH_METHOD ' >> ' $PGDATA /pg_hba.conf' "
21+ /usr/local/bin/s6-setuidgid bsd sh -c " echo ' host all all ::/0 $AUTH_METHOD ' >> ' $PGDATA /pg_hba.conf' "
22+ /usr/local/bin/s6-setuidgid bsd sh -c " echo ' local all all trust' >> ' $PGDATA /pg_hba.conf' "
2323
2424 # Listen on all interfaces
25- echo " listen_addresses = '*'" >> " $PGDATA /postgresql.conf"
25+ /usr/local/bin/s6-setuidgid bsd sh -c " echo \ " listen_addresses = '*'\ " >> ' $PGDATA /postgresql.conf' "
2626
2727 # Add shared_preload_libraries if specified (required for extensions like vchord)
2828 if [ -n " $POSTGRES_SHARED_PRELOAD_LIBRARIES " ]; then
29- echo " shared_preload_libraries = '$POSTGRES_SHARED_PRELOAD_LIBRARIES '" >> " $PGDATA /postgresql.conf"
29+ /usr/local/bin/s6-setuidgid bsd sh -c " echo \ " shared_preload_libraries = '$POSTGRES_SHARED_PRELOAD_LIBRARIES '\ " >> ' $PGDATA /postgresql.conf' "
3030 fi
3131
3232 # Start temporarily to create user/database and run init scripts
You can’t perform that action at this time.
0 commit comments