File tree 23 files changed +109
-56
lines changed
23 files changed +109
-56
lines changed Original file line number Diff line number Diff line change @@ -54,10 +54,11 @@ RUN mv -v /usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample /usr/share/post
54
54
&& ln -sv ../postgresql.conf.sample /usr/share/postgresql/$PG_MAJOR/ \
55
55
&& sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
56
56
57
- RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
57
+ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod g+s /var/run/postgresql
58
58
59
59
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
60
60
ENV PGDATA /var/lib/postgresql/data
61
+ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 700 "$PGDATA"
61
62
VOLUME /var/lib/postgresql/data
62
63
63
64
COPY docker-entrypoint.sh /
Original file line number Diff line number Diff line change @@ -55,6 +55,11 @@ RUN set -ex \
55
55
zlib-dev \
56
56
\
57
57
&& cd /usr/src/postgresql \
58
+ # update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
59
+ # see https://anonscm.debian.org/git/pkg-postgresql/postgresql.git/tree/debian/patches/51-default-sockets-in-var.patch?id=8b539fcb3e093a521c095e70bdfa76887217b89f
60
+ && awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\" /tmp\" " { $3 = "\" /var/run/postgresql\" "; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new \
61
+ && grep '/var/run/postgresql' src/include/pg_config_manual.h.new \
62
+ && mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h \
58
63
# configure options taken from:
59
64
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
60
65
&& ./configure \
@@ -113,10 +118,11 @@ RUN set -ex \
113
118
# make the sample config easier to munge (and "correct by default")
114
119
RUN sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/local/share/postgresql/postgresql.conf.sample
115
120
116
- RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
121
+ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod g+s /var/run/postgresql
117
122
118
123
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
119
124
ENV PGDATA /var/lib/postgresql/data
125
+ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 700 "$PGDATA"
120
126
VOLUME /var/lib/postgresql/data
121
127
122
128
COPY docker-entrypoint.sh /
Original file line number Diff line number Diff line change 29
29
30
30
if [ " $1 " = ' postgres' ]; then
31
31
mkdir -p " $PGDATA "
32
- chmod 700 " $PGDATA "
33
32
chown -R postgres " $PGDATA "
33
+ chmod 700 " $PGDATA "
34
+
35
+ mkdir -p /var/run/postgresql
36
+ chown -R postgres /var/run/postgresql
37
+ chmod g+s /var/run/postgresql
34
38
35
- mkdir -p /run/postgresql
36
- chmod g+s /run/postgresql
37
- chown -R postgres /run/postgresql
38
39
39
40
# look specifically for PG_VERSION, as it is expected in the DB dir
40
41
if [ ! -s " $PGDATA /PG_VERSION" ]; then
Original file line number Diff line number Diff line change 29
29
30
30
if [ " $1 " = ' postgres' ]; then
31
31
mkdir -p " $PGDATA "
32
- chmod 700 " $PGDATA "
33
32
chown -R postgres " $PGDATA "
33
+ chmod 700 " $PGDATA "
34
+
35
+ mkdir -p /var/run/postgresql
36
+ chown -R postgres /var/run/postgresql
37
+ chmod g+s /var/run/postgresql
34
38
35
- mkdir -p /run/postgresql
36
- chmod g+s /run/postgresql
37
- chown -R postgres /run/postgresql
38
39
39
40
# look specifically for PG_VERSION, as it is expected in the DB dir
40
41
if [ ! -s " $PGDATA /PG_VERSION" ]; then
Original file line number Diff line number Diff line change @@ -54,10 +54,11 @@ RUN mv -v /usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample /usr/share/post
54
54
&& ln -sv ../postgresql.conf.sample /usr/share/postgresql/$PG_MAJOR/ \
55
55
&& sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
56
56
57
- RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
57
+ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod g+s /var/run/postgresql
58
58
59
59
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
60
60
ENV PGDATA /var/lib/postgresql/data
61
+ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 700 "$PGDATA"
61
62
VOLUME /var/lib/postgresql/data
62
63
63
64
COPY docker-entrypoint.sh /
Original file line number Diff line number Diff line change @@ -55,6 +55,11 @@ RUN set -ex \
55
55
zlib-dev \
56
56
\
57
57
&& cd /usr/src/postgresql \
58
+ # update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
59
+ # see https://anonscm.debian.org/git/pkg-postgresql/postgresql.git/tree/debian/patches/51-default-sockets-in-var.patch?id=8b539fcb3e093a521c095e70bdfa76887217b89f
60
+ && awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\" /tmp\" " { $3 = "\" /var/run/postgresql\" "; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new \
61
+ && grep '/var/run/postgresql' src/include/pg_config_manual.h.new \
62
+ && mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h \
58
63
# configure options taken from:
59
64
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
60
65
&& ./configure \
@@ -113,10 +118,11 @@ RUN set -ex \
113
118
# make the sample config easier to munge (and "correct by default")
114
119
RUN sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/local/share/postgresql/postgresql.conf.sample
115
120
116
- RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
121
+ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod g+s /var/run/postgresql
117
122
118
123
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
119
124
ENV PGDATA /var/lib/postgresql/data
125
+ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 700 "$PGDATA"
120
126
VOLUME /var/lib/postgresql/data
121
127
122
128
COPY docker-entrypoint.sh /
Original file line number Diff line number Diff line change 29
29
30
30
if [ " $1 " = ' postgres' ]; then
31
31
mkdir -p " $PGDATA "
32
- chmod 700 " $PGDATA "
33
32
chown -R postgres " $PGDATA "
33
+ chmod 700 " $PGDATA "
34
+
35
+ mkdir -p /var/run/postgresql
36
+ chown -R postgres /var/run/postgresql
37
+ chmod g+s /var/run/postgresql
34
38
35
- mkdir -p /run/postgresql
36
- chmod g+s /run/postgresql
37
- chown -R postgres /run/postgresql
38
39
39
40
# look specifically for PG_VERSION, as it is expected in the DB dir
40
41
if [ ! -s " $PGDATA /PG_VERSION" ]; then
Original file line number Diff line number Diff line change 29
29
30
30
if [ " $1 " = ' postgres' ]; then
31
31
mkdir -p " $PGDATA "
32
- chmod 700 " $PGDATA "
33
32
chown -R postgres " $PGDATA "
33
+ chmod 700 " $PGDATA "
34
+
35
+ mkdir -p /var/run/postgresql
36
+ chown -R postgres /var/run/postgresql
37
+ chmod g+s /var/run/postgresql
34
38
35
- mkdir -p /run/postgresql
36
- chmod g+s /run/postgresql
37
- chown -R postgres /run/postgresql
38
39
39
40
# look specifically for PG_VERSION, as it is expected in the DB dir
40
41
if [ ! -s " $PGDATA /PG_VERSION" ]; then
Original file line number Diff line number Diff line change @@ -54,10 +54,11 @@ RUN mv -v /usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample /usr/share/post
54
54
&& ln -sv ../postgresql.conf.sample /usr/share/postgresql/$PG_MAJOR/ \
55
55
&& sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
56
56
57
- RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
57
+ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod g+s /var/run/postgresql
58
58
59
59
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
60
60
ENV PGDATA /var/lib/postgresql/data
61
+ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 700 "$PGDATA"
61
62
VOLUME /var/lib/postgresql/data
62
63
63
64
COPY docker-entrypoint.sh /
Original file line number Diff line number Diff line change @@ -55,6 +55,11 @@ RUN set -ex \
55
55
zlib-dev \
56
56
\
57
57
&& cd /usr/src/postgresql \
58
+ # update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
59
+ # see https://anonscm.debian.org/git/pkg-postgresql/postgresql.git/tree/debian/patches/51-default-sockets-in-var.patch?id=8b539fcb3e093a521c095e70bdfa76887217b89f
60
+ && awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\" /tmp\" " { $3 = "\" /var/run/postgresql\" "; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new \
61
+ && grep '/var/run/postgresql' src/include/pg_config_manual.h.new \
62
+ && mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h \
58
63
# configure options taken from:
59
64
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
60
65
&& ./configure \
@@ -113,10 +118,11 @@ RUN set -ex \
113
118
# make the sample config easier to munge (and "correct by default")
114
119
RUN sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/local/share/postgresql/postgresql.conf.sample
115
120
116
- RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
121
+ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod g+s /var/run/postgresql
117
122
118
123
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
119
124
ENV PGDATA /var/lib/postgresql/data
125
+ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 700 "$PGDATA"
120
126
VOLUME /var/lib/postgresql/data
121
127
122
128
COPY docker-entrypoint.sh /
Original file line number Diff line number Diff line change 29
29
30
30
if [ " $1 " = ' postgres' ]; then
31
31
mkdir -p " $PGDATA "
32
- chmod 700 " $PGDATA "
33
32
chown -R postgres " $PGDATA "
33
+ chmod 700 " $PGDATA "
34
+
35
+ mkdir -p /var/run/postgresql
36
+ chown -R postgres /var/run/postgresql
37
+ chmod g+s /var/run/postgresql
34
38
35
- mkdir -p /run/postgresql
36
- chmod g+s /run/postgresql
37
- chown -R postgres /run/postgresql
38
39
39
40
# look specifically for PG_VERSION, as it is expected in the DB dir
40
41
if [ ! -s " $PGDATA /PG_VERSION" ]; then
Original file line number Diff line number Diff line change 29
29
30
30
if [ " $1 " = ' postgres' ]; then
31
31
mkdir -p " $PGDATA "
32
- chmod 700 " $PGDATA "
33
32
chown -R postgres " $PGDATA "
33
+ chmod 700 " $PGDATA "
34
+
35
+ mkdir -p /var/run/postgresql
36
+ chown -R postgres /var/run/postgresql
37
+ chmod g+s /var/run/postgresql
34
38
35
- mkdir -p /run/postgresql
36
- chmod g+s /run/postgresql
37
- chown -R postgres /run/postgresql
38
39
39
40
# look specifically for PG_VERSION, as it is expected in the DB dir
40
41
if [ ! -s " $PGDATA /PG_VERSION" ]; then
Original file line number Diff line number Diff line change @@ -54,10 +54,11 @@ RUN mv -v /usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample /usr/share/post
54
54
&& ln -sv ../postgresql.conf.sample /usr/share/postgresql/$PG_MAJOR/ \
55
55
&& sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
56
56
57
- RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
57
+ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod g+s /var/run/postgresql
58
58
59
59
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
60
60
ENV PGDATA /var/lib/postgresql/data
61
+ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 700 "$PGDATA"
61
62
VOLUME /var/lib/postgresql/data
62
63
63
64
COPY docker-entrypoint.sh /
Original file line number Diff line number Diff line change @@ -55,6 +55,11 @@ RUN set -ex \
55
55
zlib-dev \
56
56
\
57
57
&& cd /usr/src/postgresql \
58
+ # update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
59
+ # see https://anonscm.debian.org/git/pkg-postgresql/postgresql.git/tree/debian/patches/51-default-sockets-in-var.patch?id=8b539fcb3e093a521c095e70bdfa76887217b89f
60
+ && awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\" /tmp\" " { $3 = "\" /var/run/postgresql\" "; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new \
61
+ && grep '/var/run/postgresql' src/include/pg_config_manual.h.new \
62
+ && mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h \
58
63
# configure options taken from:
59
64
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
60
65
&& ./configure \
@@ -113,10 +118,11 @@ RUN set -ex \
113
118
# make the sample config easier to munge (and "correct by default")
114
119
RUN sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/local/share/postgresql/postgresql.conf.sample
115
120
116
- RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
121
+ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod g+s /var/run/postgresql
117
122
118
123
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
119
124
ENV PGDATA /var/lib/postgresql/data
125
+ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 700 "$PGDATA"
120
126
VOLUME /var/lib/postgresql/data
121
127
122
128
COPY docker-entrypoint.sh /
Original file line number Diff line number Diff line change 29
29
30
30
if [ " $1 " = ' postgres' ]; then
31
31
mkdir -p " $PGDATA "
32
- chmod 700 " $PGDATA "
33
32
chown -R postgres " $PGDATA "
33
+ chmod 700 " $PGDATA "
34
+
35
+ mkdir -p /var/run/postgresql
36
+ chown -R postgres /var/run/postgresql
37
+ chmod g+s /var/run/postgresql
34
38
35
- mkdir -p /run/postgresql
36
- chmod g+s /run/postgresql
37
- chown -R postgres /run/postgresql
38
39
39
40
# look specifically for PG_VERSION, as it is expected in the DB dir
40
41
if [ ! -s " $PGDATA /PG_VERSION" ]; then
Original file line number Diff line number Diff line change 29
29
30
30
if [ " $1 " = ' postgres' ]; then
31
31
mkdir -p " $PGDATA "
32
- chmod 700 " $PGDATA "
33
32
chown -R postgres " $PGDATA "
33
+ chmod 700 " $PGDATA "
34
+
35
+ mkdir -p /var/run/postgresql
36
+ chown -R postgres /var/run/postgresql
37
+ chmod g+s /var/run/postgresql
34
38
35
- mkdir -p /run/postgresql
36
- chmod g+s /run/postgresql
37
- chown -R postgres /run/postgresql
38
39
39
40
# look specifically for PG_VERSION, as it is expected in the DB dir
40
41
if [ ! -s " $PGDATA /PG_VERSION" ]; then
Original file line number Diff line number Diff line change @@ -54,10 +54,11 @@ RUN mv -v /usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample /usr/share/post
54
54
&& ln -sv ../postgresql.conf.sample /usr/share/postgresql/$PG_MAJOR/ \
55
55
&& sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/share/postgresql/postgresql.conf.sample
56
56
57
- RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
57
+ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod g+s /var/run/postgresql
58
58
59
59
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
60
60
ENV PGDATA /var/lib/postgresql/data
61
+ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 700 "$PGDATA"
61
62
VOLUME /var/lib/postgresql/data
62
63
63
64
COPY docker-entrypoint.sh /
Original file line number Diff line number Diff line change @@ -55,6 +55,11 @@ RUN set -ex \
55
55
zlib-dev \
56
56
\
57
57
&& cd /usr/src/postgresql \
58
+ # update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
59
+ # see https://anonscm.debian.org/git/pkg-postgresql/postgresql.git/tree/debian/patches/51-default-sockets-in-var.patch?id=8b539fcb3e093a521c095e70bdfa76887217b89f
60
+ && awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\" /tmp\" " { $3 = "\" /var/run/postgresql\" "; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new \
61
+ && grep '/var/run/postgresql' src/include/pg_config_manual.h.new \
62
+ && mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h \
58
63
# configure options taken from:
59
64
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
60
65
&& ./configure \
@@ -113,10 +118,11 @@ RUN set -ex \
113
118
# make the sample config easier to munge (and "correct by default")
114
119
RUN sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/local/share/postgresql/postgresql.conf.sample
115
120
116
- RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
121
+ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod g+s /var/run/postgresql
117
122
118
123
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
119
124
ENV PGDATA /var/lib/postgresql/data
125
+ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 700 "$PGDATA"
120
126
VOLUME /var/lib/postgresql/data
121
127
122
128
COPY docker-entrypoint.sh /
Original file line number Diff line number Diff line change 29
29
30
30
if [ " $1 " = ' postgres' ]; then
31
31
mkdir -p " $PGDATA "
32
- chmod 700 " $PGDATA "
33
32
chown -R postgres " $PGDATA "
33
+ chmod 700 " $PGDATA "
34
+
35
+ mkdir -p /var/run/postgresql
36
+ chown -R postgres /var/run/postgresql
37
+ chmod g+s /var/run/postgresql
34
38
35
- mkdir -p /run/postgresql
36
- chmod g+s /run/postgresql
37
- chown -R postgres /run/postgresql
38
39
39
40
# look specifically for PG_VERSION, as it is expected in the DB dir
40
41
if [ ! -s " $PGDATA /PG_VERSION" ]; then
Original file line number Diff line number Diff line change 29
29
30
30
if [ " $1 " = ' postgres' ]; then
31
31
mkdir -p " $PGDATA "
32
- chmod 700 " $PGDATA "
33
32
chown -R postgres " $PGDATA "
33
+ chmod 700 " $PGDATA "
34
+
35
+ mkdir -p /var/run/postgresql
36
+ chown -R postgres /var/run/postgresql
37
+ chmod g+s /var/run/postgresql
34
38
35
- mkdir -p /run/postgresql
36
- chmod g+s /run/postgresql
37
- chown -R postgres /run/postgresql
38
39
39
40
# look specifically for PG_VERSION, as it is expected in the DB dir
40
41
if [ ! -s " $PGDATA /PG_VERSION" ]; then
Original file line number Diff line number Diff line change @@ -55,6 +55,11 @@ RUN set -ex \
55
55
zlib-dev \
56
56
\
57
57
&& cd /usr/src/postgresql \
58
+ # update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
59
+ # see https://anonscm.debian.org/git/pkg-postgresql/postgresql.git/tree/debian/patches/51-default-sockets-in-var.patch?id=8b539fcb3e093a521c095e70bdfa76887217b89f
60
+ && awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\" /tmp\" " { $3 = "\" /var/run/postgresql\" "; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new \
61
+ && grep '/var/run/postgresql' src/include/pg_config_manual.h.new \
62
+ && mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h \
58
63
# configure options taken from:
59
64
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
60
65
&& ./configure \
@@ -113,10 +118,11 @@ RUN set -ex \
113
118
# make the sample config easier to munge (and "correct by default")
114
119
RUN sed -ri "s!^#?(listen_addresses)\s *=\s *\S +.*!\1 = '*'!" /usr/local/share/postgresql/postgresql.conf.sample
115
120
116
- RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
121
+ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod g+s /var/run/postgresql
117
122
118
123
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
119
124
ENV PGDATA /var/lib/postgresql/data
125
+ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 700 "$PGDATA"
120
126
VOLUME /var/lib/postgresql/data
121
127
122
128
COPY docker-entrypoint.sh /
You can’t perform that action at this time.
0 commit comments