File tree 7 files changed +42
-21
lines changed
7 files changed +42
-21
lines changed Original file line number Diff line number Diff line change @@ -153,9 +153,12 @@ RUN set -ex; \
153
153
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
154
154
155
155
# make the sample config easier to munge (and "correct by default")
156
- RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
157
- && ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" \
158
- && sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
156
+ RUN set -eux; \
157
+ dpkg-divert --add --rename --divert "/usr/share/postgresql/postgresql.conf.sample.dpkg" "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" ; \
158
+ cp -v /usr/share/postgresql/postgresql.conf.sample.dpkg /usr/share/postgresql/postgresql.conf.sample; \
159
+ ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" ; \
160
+ sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample; \
161
+ grep -F "listen_addresses = '*'" /usr/share/postgresql/postgresql.conf.sample
159
162
160
163
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
161
164
Original file line number Diff line number Diff line change @@ -153,9 +153,12 @@ RUN set -ex; \
153
153
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
154
154
155
155
# make the sample config easier to munge (and "correct by default")
156
- RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
157
- && ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" \
158
- && sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
156
+ RUN set -eux; \
157
+ dpkg-divert --add --rename --divert "/usr/share/postgresql/postgresql.conf.sample.dpkg" "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" ; \
158
+ cp -v /usr/share/postgresql/postgresql.conf.sample.dpkg /usr/share/postgresql/postgresql.conf.sample; \
159
+ ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" ; \
160
+ sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample; \
161
+ grep -F "listen_addresses = '*'" /usr/share/postgresql/postgresql.conf.sample
159
162
160
163
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
161
164
Original file line number Diff line number Diff line change @@ -154,9 +154,12 @@ RUN set -ex; \
154
154
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
155
155
156
156
# make the sample config easier to munge (and "correct by default")
157
- RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
158
- && ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" \
159
- && sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
157
+ RUN set -eux; \
158
+ dpkg-divert --add --rename --divert "/usr/share/postgresql/postgresql.conf.sample.dpkg" "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" ; \
159
+ cp -v /usr/share/postgresql/postgresql.conf.sample.dpkg /usr/share/postgresql/postgresql.conf.sample; \
160
+ ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" ; \
161
+ sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample; \
162
+ grep -F "listen_addresses = '*'" /usr/share/postgresql/postgresql.conf.sample
160
163
161
164
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
162
165
Original file line number Diff line number Diff line change @@ -154,9 +154,12 @@ RUN set -ex; \
154
154
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
155
155
156
156
# make the sample config easier to munge (and "correct by default")
157
- RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
158
- && ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" \
159
- && sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
157
+ RUN set -eux; \
158
+ dpkg-divert --add --rename --divert "/usr/share/postgresql/postgresql.conf.sample.dpkg" "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" ; \
159
+ cp -v /usr/share/postgresql/postgresql.conf.sample.dpkg /usr/share/postgresql/postgresql.conf.sample; \
160
+ ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" ; \
161
+ sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample; \
162
+ grep -F "listen_addresses = '*'" /usr/share/postgresql/postgresql.conf.sample
160
163
161
164
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
162
165
Original file line number Diff line number Diff line change @@ -154,9 +154,12 @@ RUN set -ex; \
154
154
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
155
155
156
156
# make the sample config easier to munge (and "correct by default")
157
- RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
158
- && ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" \
159
- && sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
157
+ RUN set -eux; \
158
+ dpkg-divert --add --rename --divert "/usr/share/postgresql/postgresql.conf.sample.dpkg" "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" ; \
159
+ cp -v /usr/share/postgresql/postgresql.conf.sample.dpkg /usr/share/postgresql/postgresql.conf.sample; \
160
+ ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" ; \
161
+ sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample; \
162
+ grep -F "listen_addresses = '*'" /usr/share/postgresql/postgresql.conf.sample
160
163
161
164
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
162
165
Original file line number Diff line number Diff line change @@ -154,9 +154,12 @@ RUN set -ex; \
154
154
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
155
155
156
156
# make the sample config easier to munge (and "correct by default")
157
- RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
158
- && ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" \
159
- && sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
157
+ RUN set -eux; \
158
+ dpkg-divert --add --rename --divert "/usr/share/postgresql/postgresql.conf.sample.dpkg" "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" ; \
159
+ cp -v /usr/share/postgresql/postgresql.conf.sample.dpkg /usr/share/postgresql/postgresql.conf.sample; \
160
+ ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" ; \
161
+ sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample; \
162
+ grep -F "listen_addresses = '*'" /usr/share/postgresql/postgresql.conf.sample
160
163
161
164
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
162
165
Original file line number Diff line number Diff line change @@ -154,9 +154,12 @@ RUN set -ex; \
154
154
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
155
155
156
156
# make the sample config easier to munge (and "correct by default")
157
- RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
158
- && ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" \
159
- && sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
157
+ RUN set -eux; \
158
+ dpkg-divert --add --rename --divert "/usr/share/postgresql/postgresql.conf.sample.dpkg" "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" ; \
159
+ cp -v /usr/share/postgresql/postgresql.conf.sample.dpkg /usr/share/postgresql/postgresql.conf.sample; \
160
+ ln -sv ../postgresql.conf.sample "/usr/share/postgresql/$PG_MAJOR/" ; \
161
+ sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample; \
162
+ grep -F "listen_addresses = '*'" /usr/share/postgresql/postgresql.conf.sample
160
163
161
164
RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 2777 /var/run/postgresql
162
165
You can’t perform that action at this time.
0 commit comments