You've already forked postgres
mirror of
https://github.com/docker-library/postgres.git
synced 2025-11-17 13:02:40 +03:00
Merge pull request #529 from infosiftr/dpkg-divert-conf
Use "dpkg-divert" on our sample configuration file (instead of just replacing it)
This commit is contained in:
@@ -153,9 +153,12 @@ RUN set -ex; \
|
||||
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
|
||||
|
||||
# make the sample config easier to munge (and "correct by default")
|
||||
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
||||
&& ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" \
|
||||
&& sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
|
||||
RUN set -eux; \
|
||||
dpkg-divert --add --rename --divert "/usr/share/postgresql/postgresql.conf.sample.dpkg" "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample"; \
|
||||
cp -v /usr/share/postgresql/postgresql.conf.sample.dpkg /usr/share/postgresql/postgresql.conf.sample; \
|
||||
ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/"; \
|
||||
sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample; \
|
||||
grep -F "listen_addresses = '*'" /usr/share/postgresql/postgresql.conf.sample
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
|
||||
|
||||
|
||||
@@ -153,9 +153,12 @@ RUN set -ex; \
|
||||
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
|
||||
|
||||
# make the sample config easier to munge (and "correct by default")
|
||||
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
||||
&& ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" \
|
||||
&& sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
|
||||
RUN set -eux; \
|
||||
dpkg-divert --add --rename --divert "/usr/share/postgresql/postgresql.conf.sample.dpkg" "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample"; \
|
||||
cp -v /usr/share/postgresql/postgresql.conf.sample.dpkg /usr/share/postgresql/postgresql.conf.sample; \
|
||||
ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/"; \
|
||||
sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample; \
|
||||
grep -F "listen_addresses = '*'" /usr/share/postgresql/postgresql.conf.sample
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
|
||||
|
||||
|
||||
@@ -154,9 +154,12 @@ RUN set -ex; \
|
||||
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
|
||||
|
||||
# make the sample config easier to munge (and "correct by default")
|
||||
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
||||
&& ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" \
|
||||
&& sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
|
||||
RUN set -eux; \
|
||||
dpkg-divert --add --rename --divert "/usr/share/postgresql/postgresql.conf.sample.dpkg" "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample"; \
|
||||
cp -v /usr/share/postgresql/postgresql.conf.sample.dpkg /usr/share/postgresql/postgresql.conf.sample; \
|
||||
ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/"; \
|
||||
sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample; \
|
||||
grep -F "listen_addresses = '*'" /usr/share/postgresql/postgresql.conf.sample
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
|
||||
|
||||
|
||||
@@ -154,9 +154,12 @@ RUN set -ex; \
|
||||
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
|
||||
|
||||
# make the sample config easier to munge (and "correct by default")
|
||||
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
||||
&& ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" \
|
||||
&& sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
|
||||
RUN set -eux; \
|
||||
dpkg-divert --add --rename --divert "/usr/share/postgresql/postgresql.conf.sample.dpkg" "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample"; \
|
||||
cp -v /usr/share/postgresql/postgresql.conf.sample.dpkg /usr/share/postgresql/postgresql.conf.sample; \
|
||||
ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/"; \
|
||||
sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample; \
|
||||
grep -F "listen_addresses = '*'" /usr/share/postgresql/postgresql.conf.sample
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
|
||||
|
||||
|
||||
@@ -154,9 +154,12 @@ RUN set -ex; \
|
||||
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
|
||||
|
||||
# make the sample config easier to munge (and "correct by default")
|
||||
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
||||
&& ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" \
|
||||
&& sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
|
||||
RUN set -eux; \
|
||||
dpkg-divert --add --rename --divert "/usr/share/postgresql/postgresql.conf.sample.dpkg" "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample"; \
|
||||
cp -v /usr/share/postgresql/postgresql.conf.sample.dpkg /usr/share/postgresql/postgresql.conf.sample; \
|
||||
ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/"; \
|
||||
sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample; \
|
||||
grep -F "listen_addresses = '*'" /usr/share/postgresql/postgresql.conf.sample
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
|
||||
|
||||
|
||||
@@ -154,9 +154,12 @@ RUN set -ex; \
|
||||
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
|
||||
|
||||
# make the sample config easier to munge (and "correct by default")
|
||||
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
||||
&& ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" \
|
||||
&& sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
|
||||
RUN set -eux; \
|
||||
dpkg-divert --add --rename --divert "/usr/share/postgresql/postgresql.conf.sample.dpkg" "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample"; \
|
||||
cp -v /usr/share/postgresql/postgresql.conf.sample.dpkg /usr/share/postgresql/postgresql.conf.sample; \
|
||||
ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/"; \
|
||||
sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample; \
|
||||
grep -F "listen_addresses = '*'" /usr/share/postgresql/postgresql.conf.sample
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
|
||||
|
||||
|
||||
@@ -154,9 +154,12 @@ RUN set -ex; \
|
||||
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
|
||||
|
||||
# make the sample config easier to munge (and "correct by default")
|
||||
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
||||
&& ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" \
|
||||
&& sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
|
||||
RUN set -eux; \
|
||||
dpkg-divert --add --rename --divert "/usr/share/postgresql/postgresql.conf.sample.dpkg" "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample"; \
|
||||
cp -v /usr/share/postgresql/postgresql.conf.sample.dpkg /usr/share/postgresql/postgresql.conf.sample; \
|
||||
ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/"; \
|
||||
sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample; \
|
||||
grep -F "listen_addresses = '*'" /usr/share/postgresql/postgresql.conf.sample
|
||||
|
||||
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
|
||||
|
||||
|
||||
Reference in New Issue
Block a user