File tree Expand file tree Collapse file tree 6 files changed +60
-12
lines changed
Expand file tree Collapse file tree 6 files changed +60
-12
lines changed Original file line number Diff line number Diff line change 22FROM alpine:3.5
33
44# alpine includes "postgres" user/group in base install
5- # /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
6- # /etc/group:34:postgres:x:70:
5+ # /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
6+ # /etc/group:34:postgres:x:70:
7+ # the home directory for the postgres user, however, is not created by default
8+ # see https://github.com/docker-library/postgres/issues/274
9+ RUN set -ex; \
10+ postgresHome="$(getent passwd postgres)" ; \
11+ postgresHome="$(echo " $postgresHome" | cut -d: -f6)" ; \
12+ [ "$postgresHome" = '/var/lib/postgresql' ]; \
13+ mkdir -p "$postgresHome" ; \
14+ chown -R postgres:postgres "$postgresHome"
715
816# su-exec (gosu-compatible) is installed further down
917
Original file line number Diff line number Diff line change 22FROM alpine:3.5
33
44# alpine includes "postgres" user/group in base install
5- # /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
6- # /etc/group:34:postgres:x:70:
5+ # /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
6+ # /etc/group:34:postgres:x:70:
7+ # the home directory for the postgres user, however, is not created by default
8+ # see https://github.com/docker-library/postgres/issues/274
9+ RUN set -ex; \
10+ postgresHome="$(getent passwd postgres)" ; \
11+ postgresHome="$(echo " $postgresHome" | cut -d: -f6)" ; \
12+ [ "$postgresHome" = '/var/lib/postgresql' ]; \
13+ mkdir -p "$postgresHome" ; \
14+ chown -R postgres:postgres "$postgresHome"
715
816# su-exec (gosu-compatible) is installed further down
917
Original file line number Diff line number Diff line change 22FROM alpine:3.5
33
44# alpine includes "postgres" user/group in base install
5- # /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
6- # /etc/group:34:postgres:x:70:
5+ # /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
6+ # /etc/group:34:postgres:x:70:
7+ # the home directory for the postgres user, however, is not created by default
8+ # see https://github.com/docker-library/postgres/issues/274
9+ RUN set -ex; \
10+ postgresHome="$(getent passwd postgres)" ; \
11+ postgresHome="$(echo " $postgresHome" | cut -d: -f6)" ; \
12+ [ "$postgresHome" = '/var/lib/postgresql' ]; \
13+ mkdir -p "$postgresHome" ; \
14+ chown -R postgres:postgres "$postgresHome"
715
816# su-exec (gosu-compatible) is installed further down
917
Original file line number Diff line number Diff line change 22FROM alpine:3.5
33
44# alpine includes "postgres" user/group in base install
5- # /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
6- # /etc/group:34:postgres:x:70:
5+ # /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
6+ # /etc/group:34:postgres:x:70:
7+ # the home directory for the postgres user, however, is not created by default
8+ # see https://github.com/docker-library/postgres/issues/274
9+ RUN set -ex; \
10+ postgresHome="$(getent passwd postgres)" ; \
11+ postgresHome="$(echo " $postgresHome" | cut -d: -f6)" ; \
12+ [ "$postgresHome" = '/var/lib/postgresql' ]; \
13+ mkdir -p "$postgresHome" ; \
14+ chown -R postgres:postgres "$postgresHome"
715
816# su-exec (gosu-compatible) is installed further down
917
Original file line number Diff line number Diff line change 22FROM alpine:3.5
33
44# alpine includes "postgres" user/group in base install
5- # /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
6- # /etc/group:34:postgres:x:70:
5+ # /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
6+ # /etc/group:34:postgres:x:70:
7+ # the home directory for the postgres user, however, is not created by default
8+ # see https://github.com/docker-library/postgres/issues/274
9+ RUN set -ex; \
10+ postgresHome="$(getent passwd postgres)" ; \
11+ postgresHome="$(echo " $postgresHome" | cut -d: -f6)" ; \
12+ [ "$postgresHome" = '/var/lib/postgresql' ]; \
13+ mkdir -p "$postgresHome" ; \
14+ chown -R postgres:postgres "$postgresHome"
715
816# su-exec (gosu-compatible) is installed further down
917
Original file line number Diff line number Diff line change 22FROM alpine:3.5
33
44# alpine includes "postgres" user/group in base install
5- # /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
6- # /etc/group:34:postgres:x:70:
5+ # /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
6+ # /etc/group:34:postgres:x:70:
7+ # the home directory for the postgres user, however, is not created by default
8+ # see https://github.com/docker-library/postgres/issues/274
9+ RUN set -ex; \
10+ postgresHome="$(getent passwd postgres)" ; \
11+ postgresHome="$(echo " $postgresHome" | cut -d: -f6)" ; \
12+ [ "$postgresHome" = '/var/lib/postgresql' ]; \
13+ mkdir -p "$postgresHome" ; \
14+ chown -R postgres:postgres "$postgresHome"
715
816# su-exec (gosu-compatible) is installed further down
917
You can’t perform that action at this time.
0 commit comments