Skip to content

Commit

Permalink
Adjust "chmod" to not fail (since PostgreSQL validates this itself la…
Browse files Browse the repository at this point in the history
…ter)
  • Loading branch information
tianon committed Dec 28, 2020
1 parent 3690694 commit 36ffea2
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 13 deletions.
3 changes: 2 additions & 1 deletion 10/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :
Expand Down
3 changes: 2 additions & 1 deletion 10/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :
Expand Down
3 changes: 2 additions & 1 deletion 11/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :
Expand Down
3 changes: 2 additions & 1 deletion 11/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :
Expand Down
3 changes: 2 additions & 1 deletion 12/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :
Expand Down
3 changes: 2 additions & 1 deletion 12/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :
Expand Down
3 changes: 2 additions & 1 deletion 13/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :
Expand Down
3 changes: 2 additions & 1 deletion 13/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :
Expand Down
3 changes: 2 additions & 1 deletion 9.5/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :
Expand Down
3 changes: 2 additions & 1 deletion 9.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :
Expand Down
3 changes: 2 additions & 1 deletion 9.6/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :
Expand Down
3 changes: 2 additions & 1 deletion 9.6/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :
Expand Down
3 changes: 2 additions & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :
Expand Down

0 comments on commit 36ffea2

Please sign in to comment.