You've already forked postgres
mirror of
https://github.com/docker-library/postgres.git
synced 2025-11-17 13:02:40 +03:00
Add "mkdir ~postgres" with proper permissions
This commit is contained in:
@@ -4,6 +4,14 @@ 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:
|
||||
# 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
|
||||
|
||||
|
||||
@@ -4,6 +4,14 @@ 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:
|
||||
# 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
|
||||
|
||||
|
||||
@@ -4,6 +4,14 @@ 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:
|
||||
# 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
|
||||
|
||||
|
||||
@@ -4,6 +4,14 @@ 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:
|
||||
# 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
|
||||
|
||||
|
||||
@@ -4,6 +4,14 @@ 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:
|
||||
# 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
|
||||
|
||||
|
||||
@@ -4,6 +4,14 @@ 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:
|
||||
# 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user