Skip to content

Commit 36ffea2

Browse files
committed
Adjust "chmod" to not fail (since PostgreSQL validates this itself later)
1 parent 3690694 commit 36ffea2

13 files changed

+26
-13
lines changed

Diff for: 10/alpine/docker-entrypoint.sh

+2-1
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 || :

Diff for: 10/docker-entrypoint.sh

+2-1
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 || :

Diff for: 11/alpine/docker-entrypoint.sh

+2-1
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 || :

Diff for: 11/docker-entrypoint.sh

+2-1
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 || :

Diff for: 12/alpine/docker-entrypoint.sh

+2-1
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 || :

Diff for: 12/docker-entrypoint.sh

+2-1
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 || :

Diff for: 13/alpine/docker-entrypoint.sh

+2-1
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 || :

Diff for: 13/docker-entrypoint.sh

+2-1
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 || :

Diff for: 9.5/alpine/docker-entrypoint.sh

+2-1
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 || :

Diff for: 9.5/docker-entrypoint.sh

+2-1
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 || :

Diff for: 9.6/alpine/docker-entrypoint.sh

+2-1
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 || :

Diff for: 9.6/docker-entrypoint.sh

+2-1
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 || :

Diff for: docker-entrypoint.sh

+2-1
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)