File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ ENV PG_BINDIR=/usr/lib/postgresql/${PG_VERSION}/bin \
1515RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
1616 && echo 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
1717 && apt-get update \
18- && DEBIAN_FRONTEND=noninteractive apt-get install -y postgresql-${PG_VERSION} postgresql-client-${PG_VERSION} postgresql-contrib-${PG_VERSION} \
18+ && DEBIAN_FRONTEND=noninteractive apt-get install -y postgresql-${PG_VERSION} postgresql-client-${PG_VERSION} postgresql-contrib-${PG_VERSION} acl \
1919 && ln -sf ${PG_DATADIR}/postgresql.conf /etc/postgresql/${PG_VERSION}/main/postgresql.conf \
2020 && ln -sf ${PG_DATADIR}/pg_hba.conf /etc/postgresql/${PG_VERSION}/main/pg_hba.conf \
2121 && ln -sf ${PG_DATADIR}/pg_ident.conf /etc/postgresql/${PG_VERSION}/main/pg_ident.conf \
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ if [[ -z ${1} ]]; then
3131 create_database
3232 create_replication_user
3333
34+ set_resolvconf_perms
35+
3436 echo " Starting PostgreSQL ${PG_VERSION} ..."
3537 exec start-stop-daemon --start --chuid ${PG_USER} :${PG_USER} \
3638 --exec ${PG_BINDIR} /postgres -- -D ${PG_DATADIR} ${EXTRA_ARGS}
Original file line number Diff line number Diff line change @@ -346,3 +346,8 @@ create_replication_user() {
346346 esac
347347 fi
348348}
349+
350+ set_resolvconf_perms () {
351+ echo " Setting resolv ACLs..."
352+ setfacl -m user:${PG_USER} :r /etc/resolv.conf
353+ }
You can’t perform that action at this time.
0 commit comments