diff --git a/10/alpine/docker-entrypoint.sh b/10/alpine/docker-entrypoint.sh index 72cdc53d65..d95a37fb3a 100755 --- a/10/alpine/docker-entrypoint.sh +++ b/10/alpine/docker-entrypoint.sh @@ -37,7 +37,8 @@ docker_create_db_directories() { local user; user="$(id -u)" mkdir -p "$PGDATA" - chmod 700 "$PGDATA" + # ignore failure since there are cases where we can't chmod (and PostgreSQL might fail later anyhow - it's picky about permissions of this directory) + chmod 700 "$PGDATA" || : # ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289 mkdir -p /var/run/postgresql || : diff --git a/10/docker-entrypoint.sh b/10/docker-entrypoint.sh index 51d871b717..69155541bb 100755 --- a/10/docker-entrypoint.sh +++ b/10/docker-entrypoint.sh @@ -37,7 +37,8 @@ docker_create_db_directories() { local user; user="$(id -u)" mkdir -p "$PGDATA" - chmod 700 "$PGDATA" + # ignore failure since there are cases where we can't chmod (and PostgreSQL might fail later anyhow - it's picky about permissions of this directory) + chmod 700 "$PGDATA" || : # ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289 mkdir -p /var/run/postgresql || : diff --git a/11/alpine/docker-entrypoint.sh b/11/alpine/docker-entrypoint.sh index 72cdc53d65..d95a37fb3a 100755 --- a/11/alpine/docker-entrypoint.sh +++ b/11/alpine/docker-entrypoint.sh @@ -37,7 +37,8 @@ docker_create_db_directories() { local user; user="$(id -u)" mkdir -p "$PGDATA" - chmod 700 "$PGDATA" + # ignore failure since there are cases where we can't chmod (and PostgreSQL might fail later anyhow - it's picky about permissions of this directory) + chmod 700 "$PGDATA" || : # ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289 mkdir -p /var/run/postgresql || : diff --git a/11/docker-entrypoint.sh b/11/docker-entrypoint.sh index 51d871b717..69155541bb 100755 --- a/11/docker-entrypoint.sh +++ b/11/docker-entrypoint.sh @@ -37,7 +37,8 @@ docker_create_db_directories() { local user; user="$(id -u)" mkdir -p "$PGDATA" - chmod 700 "$PGDATA" + # ignore failure since there are cases where we can't chmod (and PostgreSQL might fail later anyhow - it's picky about permissions of this directory) + chmod 700 "$PGDATA" || : # ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289 mkdir -p /var/run/postgresql || : diff --git a/12/alpine/docker-entrypoint.sh b/12/alpine/docker-entrypoint.sh index 72cdc53d65..d95a37fb3a 100755 --- a/12/alpine/docker-entrypoint.sh +++ b/12/alpine/docker-entrypoint.sh @@ -37,7 +37,8 @@ docker_create_db_directories() { local user; user="$(id -u)" mkdir -p "$PGDATA" - chmod 700 "$PGDATA" + # ignore failure since there are cases where we can't chmod (and PostgreSQL might fail later anyhow - it's picky about permissions of this directory) + chmod 700 "$PGDATA" || : # ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289 mkdir -p /var/run/postgresql || : diff --git a/12/docker-entrypoint.sh b/12/docker-entrypoint.sh index 51d871b717..69155541bb 100755 --- a/12/docker-entrypoint.sh +++ b/12/docker-entrypoint.sh @@ -37,7 +37,8 @@ docker_create_db_directories() { local user; user="$(id -u)" mkdir -p "$PGDATA" - chmod 700 "$PGDATA" + # ignore failure since there are cases where we can't chmod (and PostgreSQL might fail later anyhow - it's picky about permissions of this directory) + chmod 700 "$PGDATA" || : # ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289 mkdir -p /var/run/postgresql || : diff --git a/13/alpine/docker-entrypoint.sh b/13/alpine/docker-entrypoint.sh index 72cdc53d65..d95a37fb3a 100755 --- a/13/alpine/docker-entrypoint.sh +++ b/13/alpine/docker-entrypoint.sh @@ -37,7 +37,8 @@ docker_create_db_directories() { local user; user="$(id -u)" mkdir -p "$PGDATA" - chmod 700 "$PGDATA" + # ignore failure since there are cases where we can't chmod (and PostgreSQL might fail later anyhow - it's picky about permissions of this directory) + chmod 700 "$PGDATA" || : # ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289 mkdir -p /var/run/postgresql || : diff --git a/13/docker-entrypoint.sh b/13/docker-entrypoint.sh index 51d871b717..69155541bb 100755 --- a/13/docker-entrypoint.sh +++ b/13/docker-entrypoint.sh @@ -37,7 +37,8 @@ docker_create_db_directories() { local user; user="$(id -u)" mkdir -p "$PGDATA" - chmod 700 "$PGDATA" + # ignore failure since there are cases where we can't chmod (and PostgreSQL might fail later anyhow - it's picky about permissions of this directory) + chmod 700 "$PGDATA" || : # ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289 mkdir -p /var/run/postgresql || : diff --git a/9.5/alpine/docker-entrypoint.sh b/9.5/alpine/docker-entrypoint.sh index 0e0e2e914b..7c82faea26 100755 --- a/9.5/alpine/docker-entrypoint.sh +++ b/9.5/alpine/docker-entrypoint.sh @@ -37,7 +37,8 @@ docker_create_db_directories() { local user; user="$(id -u)" mkdir -p "$PGDATA" - chmod 700 "$PGDATA" + # ignore failure since there are cases where we can't chmod (and PostgreSQL might fail later anyhow - it's picky about permissions of this directory) + chmod 700 "$PGDATA" || : # ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289 mkdir -p /var/run/postgresql || : diff --git a/9.5/docker-entrypoint.sh b/9.5/docker-entrypoint.sh index 49374701a6..ed16fa48b1 100755 --- a/9.5/docker-entrypoint.sh +++ b/9.5/docker-entrypoint.sh @@ -37,7 +37,8 @@ docker_create_db_directories() { local user; user="$(id -u)" mkdir -p "$PGDATA" - chmod 700 "$PGDATA" + # ignore failure since there are cases where we can't chmod (and PostgreSQL might fail later anyhow - it's picky about permissions of this directory) + chmod 700 "$PGDATA" || : # ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289 mkdir -p /var/run/postgresql || : diff --git a/9.6/alpine/docker-entrypoint.sh b/9.6/alpine/docker-entrypoint.sh index 0e0e2e914b..7c82faea26 100755 --- a/9.6/alpine/docker-entrypoint.sh +++ b/9.6/alpine/docker-entrypoint.sh @@ -37,7 +37,8 @@ docker_create_db_directories() { local user; user="$(id -u)" mkdir -p "$PGDATA" - chmod 700 "$PGDATA" + # ignore failure since there are cases where we can't chmod (and PostgreSQL might fail later anyhow - it's picky about permissions of this directory) + chmod 700 "$PGDATA" || : # ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289 mkdir -p /var/run/postgresql || : diff --git a/9.6/docker-entrypoint.sh b/9.6/docker-entrypoint.sh index 49374701a6..ed16fa48b1 100755 --- a/9.6/docker-entrypoint.sh +++ b/9.6/docker-entrypoint.sh @@ -37,7 +37,8 @@ docker_create_db_directories() { local user; user="$(id -u)" mkdir -p "$PGDATA" - chmod 700 "$PGDATA" + # ignore failure since there are cases where we can't chmod (and PostgreSQL might fail later anyhow - it's picky about permissions of this directory) + chmod 700 "$PGDATA" || : # ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289 mkdir -p /var/run/postgresql || : diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 51d871b717..69155541bb 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -37,7 +37,8 @@ docker_create_db_directories() { local user; user="$(id -u)" mkdir -p "$PGDATA" - chmod 700 "$PGDATA" + # ignore failure since there are cases where we can't chmod (and PostgreSQL might fail later anyhow - it's picky about permissions of this directory) + chmod 700 "$PGDATA" || : # ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289 mkdir -p /var/run/postgresql || :