Skip to content

Commit eaeb73d

Browse files
authored
Merge pull request #804 from infosiftr/chmod-no-fail
Adjust "chmod" to not fail (since PostgreSQL validates this itself later)
2 parents 3690694 + 36ffea2 commit eaeb73d

13 files changed

+26
-13
lines changed

10/alpine/docker-entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ docker_create_db_directories() {
3737
local user; user="$(id -u)"
3838

3939
mkdir -p "$PGDATA"
40-
chmod 700 "$PGDATA"
40+
# 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)
41+
chmod 700 "$PGDATA" || :
4142

4243
# ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289
4344
mkdir -p /var/run/postgresql || :

10/docker-entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ docker_create_db_directories() {
3737
local user; user="$(id -u)"
3838

3939
mkdir -p "$PGDATA"
40-
chmod 700 "$PGDATA"
40+
# 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)
41+
chmod 700 "$PGDATA" || :
4142

4243
# ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289
4344
mkdir -p /var/run/postgresql || :

11/alpine/docker-entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ docker_create_db_directories() {
3737
local user; user="$(id -u)"
3838

3939
mkdir -p "$PGDATA"
40-
chmod 700 "$PGDATA"
40+
# 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)
41+
chmod 700 "$PGDATA" || :
4142

4243
# ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289
4344
mkdir -p /var/run/postgresql || :

11/docker-entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ docker_create_db_directories() {
3737
local user; user="$(id -u)"
3838

3939
mkdir -p "$PGDATA"
40-
chmod 700 "$PGDATA"
40+
# 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)
41+
chmod 700 "$PGDATA" || :
4142

4243
# ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289
4344
mkdir -p /var/run/postgresql || :

12/alpine/docker-entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ docker_create_db_directories() {
3737
local user; user="$(id -u)"
3838

3939
mkdir -p "$PGDATA"
40-
chmod 700 "$PGDATA"
40+
# 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)
41+
chmod 700 "$PGDATA" || :
4142

4243
# ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289
4344
mkdir -p /var/run/postgresql || :

12/docker-entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ docker_create_db_directories() {
3737
local user; user="$(id -u)"
3838

3939
mkdir -p "$PGDATA"
40-
chmod 700 "$PGDATA"
40+
# 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)
41+
chmod 700 "$PGDATA" || :
4142

4243
# ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289
4344
mkdir -p /var/run/postgresql || :

13/alpine/docker-entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ docker_create_db_directories() {
3737
local user; user="$(id -u)"
3838

3939
mkdir -p "$PGDATA"
40-
chmod 700 "$PGDATA"
40+
# 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)
41+
chmod 700 "$PGDATA" || :
4142

4243
# ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289
4344
mkdir -p /var/run/postgresql || :

13/docker-entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ docker_create_db_directories() {
3737
local user; user="$(id -u)"
3838

3939
mkdir -p "$PGDATA"
40-
chmod 700 "$PGDATA"
40+
# 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)
41+
chmod 700 "$PGDATA" || :
4142

4243
# ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289
4344
mkdir -p /var/run/postgresql || :

9.5/alpine/docker-entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ docker_create_db_directories() {
3737
local user; user="$(id -u)"
3838

3939
mkdir -p "$PGDATA"
40-
chmod 700 "$PGDATA"
40+
# 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)
41+
chmod 700 "$PGDATA" || :
4142

4243
# ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289
4344
mkdir -p /var/run/postgresql || :

9.5/docker-entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ docker_create_db_directories() {
3737
local user; user="$(id -u)"
3838

3939
mkdir -p "$PGDATA"
40-
chmod 700 "$PGDATA"
40+
# 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)
41+
chmod 700 "$PGDATA" || :
4142

4243
# ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289
4344
mkdir -p /var/run/postgresql || :

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy