Skip to content

Adjust "chmod" to not fail (since PostgreSQL validates this itself later) #804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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