Skip to content

Commit 797fadc

Browse files
committed
Add a note about "tzdata", adjust configuration appropriately, and remove fetch deps too
1 parent a9c1b15 commit 797fadc

File tree

6 files changed

+36
-6
lines changed

6 files changed

+36
-6
lines changed

9.2/alpine/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,18 @@ RUN set -ex \
9898
$runDeps \
9999
bash \
100100
su-exec \
101-
&& apk del .build-deps \
101+
# tzdata loading functionality is optional, and fails gracefully
102+
# tzdata \
103+
&& apk del .fetch-deps .build-deps \
102104
&& cd / \
103105
&& rm -rf \
104106
/usr/src/postgresql \
105107
/usr/local/include/* \
106108
&& find /usr/local -name '*.a' -delete
107109

110+
# make the sample config easier to munge (and "correct by default")
111+
RUN sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/local/share/postgresql/postgresql.conf.sample
112+
108113
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
109114

110115
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH

9.3/alpine/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,18 @@ RUN set -ex \
9898
$runDeps \
9999
bash \
100100
su-exec \
101-
&& apk del .build-deps \
101+
# tzdata loading functionality is optional, and fails gracefully
102+
# tzdata \
103+
&& apk del .fetch-deps .build-deps \
102104
&& cd / \
103105
&& rm -rf \
104106
/usr/src/postgresql \
105107
/usr/local/include/* \
106108
&& find /usr/local -name '*.a' -delete
107109

110+
# make the sample config easier to munge (and "correct by default")
111+
RUN sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/local/share/postgresql/postgresql.conf.sample
112+
108113
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
109114

110115
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH

9.4/alpine/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,18 @@ RUN set -ex \
9898
$runDeps \
9999
bash \
100100
su-exec \
101-
&& apk del .build-deps \
101+
# tzdata loading functionality is optional, and fails gracefully
102+
# tzdata \
103+
&& apk del .fetch-deps .build-deps \
102104
&& cd / \
103105
&& rm -rf \
104106
/usr/src/postgresql \
105107
/usr/local/include/* \
106108
&& find /usr/local -name '*.a' -delete
107109

110+
# make the sample config easier to munge (and "correct by default")
111+
RUN sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/local/share/postgresql/postgresql.conf.sample
112+
108113
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
109114

110115
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH

9.5/alpine/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,18 @@ RUN set -ex \
9898
$runDeps \
9999
bash \
100100
su-exec \
101-
&& apk del .build-deps \
101+
# tzdata loading functionality is optional, and fails gracefully
102+
# tzdata \
103+
&& apk del .fetch-deps .build-deps \
102104
&& cd / \
103105
&& rm -rf \
104106
/usr/src/postgresql \
105107
/usr/local/include/* \
106108
&& find /usr/local -name '*.a' -delete
107109

110+
# make the sample config easier to munge (and "correct by default")
111+
RUN sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/local/share/postgresql/postgresql.conf.sample
112+
108113
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
109114

110115
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH

9.6/alpine/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,18 @@ RUN set -ex \
9898
$runDeps \
9999
bash \
100100
su-exec \
101-
&& apk del .build-deps \
101+
# tzdata loading functionality is optional, and fails gracefully
102+
# tzdata \
103+
&& apk del .fetch-deps .build-deps \
102104
&& cd / \
103105
&& rm -rf \
104106
/usr/src/postgresql \
105107
/usr/local/include/* \
106108
&& find /usr/local -name '*.a' -delete
107109

110+
# make the sample config easier to munge (and "correct by default")
111+
RUN sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/local/share/postgresql/postgresql.conf.sample
112+
108113
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
109114

110115
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH

Dockerfile-alpine.template

+6-1
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,18 @@ RUN set -ex \
9898
$runDeps \
9999
bash \
100100
su-exec \
101-
&& apk del .build-deps \
101+
# tzdata loading functionality is optional, and fails gracefully
102+
# tzdata \
103+
&& apk del .fetch-deps .build-deps \
102104
&& cd / \
103105
&& rm -rf \
104106
/usr/src/postgresql \
105107
/usr/local/include/* \
106108
&& find /usr/local -name '*.a' -delete
107109

110+
# make the sample config easier to munge (and "correct by default")
111+
RUN sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/local/share/postgresql/postgresql.conf.sample
112+
108113
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
109114

110115
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH

0 commit comments

Comments
 (0)