File tree 6 files changed +60
-12
lines changed
6 files changed +60
-12
lines changed Original file line number Diff line number Diff line change 2
2
FROM alpine:3.5
3
3
4
4
# 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"
7
15
8
16
# su-exec (gosu-compatible) is installed further down
9
17
Original file line number Diff line number Diff line change 2
2
FROM alpine:3.5
3
3
4
4
# 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"
7
15
8
16
# su-exec (gosu-compatible) is installed further down
9
17
Original file line number Diff line number Diff line change 2
2
FROM alpine:3.5
3
3
4
4
# 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"
7
15
8
16
# su-exec (gosu-compatible) is installed further down
9
17
Original file line number Diff line number Diff line change 2
2
FROM alpine:3.5
3
3
4
4
# 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"
7
15
8
16
# su-exec (gosu-compatible) is installed further down
9
17
Original file line number Diff line number Diff line change 2
2
FROM alpine:3.5
3
3
4
4
# 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"
7
15
8
16
# su-exec (gosu-compatible) is installed further down
9
17
Original file line number Diff line number Diff line change 2
2
FROM alpine:3.5
3
3
4
4
# 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"
7
15
8
16
# su-exec (gosu-compatible) is installed further down
9
17
You can’t perform that action at this time.
0 commit comments