Merge pull request #277 from infosiftr/alpine-mkdir-home
Add "mkdir ~postgres" with proper permissions
This commit is contained in:
commit
5fddf91c23
|
|
@ -2,8 +2,16 @@
|
|||
FROM alpine:3.5
|
||||
|
||||
# alpine includes "postgres" user/group in base install
|
||||
# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
|
||||
# /etc/group:34:postgres:x:70:
|
||||
# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
|
||||
# /etc/group:34:postgres:x:70:
|
||||
# the home directory for the postgres user, however, is not created by default
|
||||
# see https://github.com/docker-library/postgres/issues/274
|
||||
RUN set -ex; \
|
||||
postgresHome="$(getent passwd postgres)"; \
|
||||
postgresHome="$(echo "$postgresHome" | cut -d: -f6)"; \
|
||||
[ "$postgresHome" = '/var/lib/postgresql' ]; \
|
||||
mkdir -p "$postgresHome"; \
|
||||
chown -R postgres:postgres "$postgresHome"
|
||||
|
||||
# su-exec (gosu-compatible) is installed further down
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,16 @@
|
|||
FROM alpine:3.5
|
||||
|
||||
# alpine includes "postgres" user/group in base install
|
||||
# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
|
||||
# /etc/group:34:postgres:x:70:
|
||||
# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
|
||||
# /etc/group:34:postgres:x:70:
|
||||
# the home directory for the postgres user, however, is not created by default
|
||||
# see https://github.com/docker-library/postgres/issues/274
|
||||
RUN set -ex; \
|
||||
postgresHome="$(getent passwd postgres)"; \
|
||||
postgresHome="$(echo "$postgresHome" | cut -d: -f6)"; \
|
||||
[ "$postgresHome" = '/var/lib/postgresql' ]; \
|
||||
mkdir -p "$postgresHome"; \
|
||||
chown -R postgres:postgres "$postgresHome"
|
||||
|
||||
# su-exec (gosu-compatible) is installed further down
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,16 @@
|
|||
FROM alpine:3.5
|
||||
|
||||
# alpine includes "postgres" user/group in base install
|
||||
# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
|
||||
# /etc/group:34:postgres:x:70:
|
||||
# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
|
||||
# /etc/group:34:postgres:x:70:
|
||||
# the home directory for the postgres user, however, is not created by default
|
||||
# see https://github.com/docker-library/postgres/issues/274
|
||||
RUN set -ex; \
|
||||
postgresHome="$(getent passwd postgres)"; \
|
||||
postgresHome="$(echo "$postgresHome" | cut -d: -f6)"; \
|
||||
[ "$postgresHome" = '/var/lib/postgresql' ]; \
|
||||
mkdir -p "$postgresHome"; \
|
||||
chown -R postgres:postgres "$postgresHome"
|
||||
|
||||
# su-exec (gosu-compatible) is installed further down
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,16 @@
|
|||
FROM alpine:3.5
|
||||
|
||||
# alpine includes "postgres" user/group in base install
|
||||
# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
|
||||
# /etc/group:34:postgres:x:70:
|
||||
# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
|
||||
# /etc/group:34:postgres:x:70:
|
||||
# the home directory for the postgres user, however, is not created by default
|
||||
# see https://github.com/docker-library/postgres/issues/274
|
||||
RUN set -ex; \
|
||||
postgresHome="$(getent passwd postgres)"; \
|
||||
postgresHome="$(echo "$postgresHome" | cut -d: -f6)"; \
|
||||
[ "$postgresHome" = '/var/lib/postgresql' ]; \
|
||||
mkdir -p "$postgresHome"; \
|
||||
chown -R postgres:postgres "$postgresHome"
|
||||
|
||||
# su-exec (gosu-compatible) is installed further down
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,16 @@
|
|||
FROM alpine:3.5
|
||||
|
||||
# alpine includes "postgres" user/group in base install
|
||||
# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
|
||||
# /etc/group:34:postgres:x:70:
|
||||
# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
|
||||
# /etc/group:34:postgres:x:70:
|
||||
# the home directory for the postgres user, however, is not created by default
|
||||
# see https://github.com/docker-library/postgres/issues/274
|
||||
RUN set -ex; \
|
||||
postgresHome="$(getent passwd postgres)"; \
|
||||
postgresHome="$(echo "$postgresHome" | cut -d: -f6)"; \
|
||||
[ "$postgresHome" = '/var/lib/postgresql' ]; \
|
||||
mkdir -p "$postgresHome"; \
|
||||
chown -R postgres:postgres "$postgresHome"
|
||||
|
||||
# su-exec (gosu-compatible) is installed further down
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,16 @@
|
|||
FROM alpine:3.5
|
||||
|
||||
# alpine includes "postgres" user/group in base install
|
||||
# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
|
||||
# /etc/group:34:postgres:x:70:
|
||||
# /etc/passwd:22:postgres:x:70:70::/var/lib/postgresql:/bin/sh
|
||||
# /etc/group:34:postgres:x:70:
|
||||
# the home directory for the postgres user, however, is not created by default
|
||||
# see https://github.com/docker-library/postgres/issues/274
|
||||
RUN set -ex; \
|
||||
postgresHome="$(getent passwd postgres)"; \
|
||||
postgresHome="$(echo "$postgresHome" | cut -d: -f6)"; \
|
||||
[ "$postgresHome" = '/var/lib/postgresql' ]; \
|
||||
mkdir -p "$postgresHome"; \
|
||||
chown -R postgres:postgres "$postgresHome"
|
||||
|
||||
# su-exec (gosu-compatible) is installed further down
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue