From c9d9f4c1a0d33a161fefda666f041ef0dc4dc9f8 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 24 Dec 2014 16:43:17 -0700 Subject: [PATCH] Minor formatting/output changes --- 8.4/Dockerfile | 2 +- 8.4/docker-entrypoint.sh | 13 ++++++++----- 9.0/Dockerfile | 2 +- 9.0/docker-entrypoint.sh | 13 ++++++++----- 9.1/Dockerfile | 2 +- 9.1/docker-entrypoint.sh | 13 ++++++++----- 9.2/Dockerfile | 2 +- 9.2/docker-entrypoint.sh | 13 ++++++++----- 9.3/Dockerfile | 2 +- 9.3/docker-entrypoint.sh | 13 ++++++++----- 9.4/Dockerfile | 2 +- 9.4/docker-entrypoint.sh | 13 ++++++++----- Dockerfile.template | 2 +- docker-entrypoint.sh | 13 ++++++++----- 14 files changed, 63 insertions(+), 42 deletions(-) diff --git a/8.4/Dockerfile b/8.4/Dockerfile index 962124ccc7..1ba0a448d6 100644 --- a/8.4/Dockerfile +++ b/8.4/Dockerfile @@ -42,7 +42,7 @@ ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH ENV PGDATA /var/lib/postgresql/data VOLUME /var/lib/postgresql/data -COPY ./docker-entrypoint.sh / +COPY docker-entrypoint.sh / ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/8.4/docker-entrypoint.sh b/8.4/docker-entrypoint.sh index e07a76e997..28f8354f70 100755 --- a/8.4/docker-entrypoint.sh +++ b/8.4/docker-entrypoint.sh @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then pass="PASSWORD '$POSTGRES_PASSWORD'" authMethod=md5 else - # The - option suppresses leading tabs but *not* spaces. :) + # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOWARN' **************************************************** WARNING: No password has been set for the database. @@ -33,14 +33,17 @@ if [ "$1" = 'postgres' ]; then op='ALTER' else op='CREATE' - gosu postgres postgres --single -E <<-EOSQL - CREATE DATABASE "$POSTGRES_USER" + gosu postgres postgres --single -jE <<-EOSQL + CREATE DATABASE "$POSTGRES_USER" ; EOSQL + echo fi - gosu postgres postgres --single <<-EOSQL - $op USER "$POSTGRES_USER" WITH SUPERUSER $pass + gosu postgres postgres --single -jE <<-EOSQL + $op USER "$POSTGRES_USER" WITH SUPERUSER $pass ; EOSQL + echo + { echo; echo "host all \"$POSTGRES_USER\" 0.0.0.0/0 $authMethod"; } >> "$PGDATA"/pg_hba.conf if [ -d /docker-entrypoint-initdb.d ]; then diff --git a/9.0/Dockerfile b/9.0/Dockerfile index b4b875d17f..6ddcbd60c0 100644 --- a/9.0/Dockerfile +++ b/9.0/Dockerfile @@ -42,7 +42,7 @@ ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH ENV PGDATA /var/lib/postgresql/data VOLUME /var/lib/postgresql/data -COPY ./docker-entrypoint.sh / +COPY docker-entrypoint.sh / ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/9.0/docker-entrypoint.sh b/9.0/docker-entrypoint.sh index e07a76e997..28f8354f70 100755 --- a/9.0/docker-entrypoint.sh +++ b/9.0/docker-entrypoint.sh @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then pass="PASSWORD '$POSTGRES_PASSWORD'" authMethod=md5 else - # The - option suppresses leading tabs but *not* spaces. :) + # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOWARN' **************************************************** WARNING: No password has been set for the database. @@ -33,14 +33,17 @@ if [ "$1" = 'postgres' ]; then op='ALTER' else op='CREATE' - gosu postgres postgres --single -E <<-EOSQL - CREATE DATABASE "$POSTGRES_USER" + gosu postgres postgres --single -jE <<-EOSQL + CREATE DATABASE "$POSTGRES_USER" ; EOSQL + echo fi - gosu postgres postgres --single <<-EOSQL - $op USER "$POSTGRES_USER" WITH SUPERUSER $pass + gosu postgres postgres --single -jE <<-EOSQL + $op USER "$POSTGRES_USER" WITH SUPERUSER $pass ; EOSQL + echo + { echo; echo "host all \"$POSTGRES_USER\" 0.0.0.0/0 $authMethod"; } >> "$PGDATA"/pg_hba.conf if [ -d /docker-entrypoint-initdb.d ]; then diff --git a/9.1/Dockerfile b/9.1/Dockerfile index cee7632bf5..7b78548b9b 100644 --- a/9.1/Dockerfile +++ b/9.1/Dockerfile @@ -42,7 +42,7 @@ ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH ENV PGDATA /var/lib/postgresql/data VOLUME /var/lib/postgresql/data -COPY ./docker-entrypoint.sh / +COPY docker-entrypoint.sh / ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/9.1/docker-entrypoint.sh b/9.1/docker-entrypoint.sh index e07a76e997..28f8354f70 100755 --- a/9.1/docker-entrypoint.sh +++ b/9.1/docker-entrypoint.sh @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then pass="PASSWORD '$POSTGRES_PASSWORD'" authMethod=md5 else - # The - option suppresses leading tabs but *not* spaces. :) + # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOWARN' **************************************************** WARNING: No password has been set for the database. @@ -33,14 +33,17 @@ if [ "$1" = 'postgres' ]; then op='ALTER' else op='CREATE' - gosu postgres postgres --single -E <<-EOSQL - CREATE DATABASE "$POSTGRES_USER" + gosu postgres postgres --single -jE <<-EOSQL + CREATE DATABASE "$POSTGRES_USER" ; EOSQL + echo fi - gosu postgres postgres --single <<-EOSQL - $op USER "$POSTGRES_USER" WITH SUPERUSER $pass + gosu postgres postgres --single -jE <<-EOSQL + $op USER "$POSTGRES_USER" WITH SUPERUSER $pass ; EOSQL + echo + { echo; echo "host all \"$POSTGRES_USER\" 0.0.0.0/0 $authMethod"; } >> "$PGDATA"/pg_hba.conf if [ -d /docker-entrypoint-initdb.d ]; then diff --git a/9.2/Dockerfile b/9.2/Dockerfile index bb1fbcd426..9c5d46808c 100644 --- a/9.2/Dockerfile +++ b/9.2/Dockerfile @@ -42,7 +42,7 @@ ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH ENV PGDATA /var/lib/postgresql/data VOLUME /var/lib/postgresql/data -COPY ./docker-entrypoint.sh / +COPY docker-entrypoint.sh / ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/9.2/docker-entrypoint.sh b/9.2/docker-entrypoint.sh index e07a76e997..28f8354f70 100755 --- a/9.2/docker-entrypoint.sh +++ b/9.2/docker-entrypoint.sh @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then pass="PASSWORD '$POSTGRES_PASSWORD'" authMethod=md5 else - # The - option suppresses leading tabs but *not* spaces. :) + # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOWARN' **************************************************** WARNING: No password has been set for the database. @@ -33,14 +33,17 @@ if [ "$1" = 'postgres' ]; then op='ALTER' else op='CREATE' - gosu postgres postgres --single -E <<-EOSQL - CREATE DATABASE "$POSTGRES_USER" + gosu postgres postgres --single -jE <<-EOSQL + CREATE DATABASE "$POSTGRES_USER" ; EOSQL + echo fi - gosu postgres postgres --single <<-EOSQL - $op USER "$POSTGRES_USER" WITH SUPERUSER $pass + gosu postgres postgres --single -jE <<-EOSQL + $op USER "$POSTGRES_USER" WITH SUPERUSER $pass ; EOSQL + echo + { echo; echo "host all \"$POSTGRES_USER\" 0.0.0.0/0 $authMethod"; } >> "$PGDATA"/pg_hba.conf if [ -d /docker-entrypoint-initdb.d ]; then diff --git a/9.3/Dockerfile b/9.3/Dockerfile index 5dad65fcbc..c0dae9e96c 100644 --- a/9.3/Dockerfile +++ b/9.3/Dockerfile @@ -42,7 +42,7 @@ ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH ENV PGDATA /var/lib/postgresql/data VOLUME /var/lib/postgresql/data -COPY ./docker-entrypoint.sh / +COPY docker-entrypoint.sh / ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/9.3/docker-entrypoint.sh b/9.3/docker-entrypoint.sh index e07a76e997..28f8354f70 100755 --- a/9.3/docker-entrypoint.sh +++ b/9.3/docker-entrypoint.sh @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then pass="PASSWORD '$POSTGRES_PASSWORD'" authMethod=md5 else - # The - option suppresses leading tabs but *not* spaces. :) + # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOWARN' **************************************************** WARNING: No password has been set for the database. @@ -33,14 +33,17 @@ if [ "$1" = 'postgres' ]; then op='ALTER' else op='CREATE' - gosu postgres postgres --single -E <<-EOSQL - CREATE DATABASE "$POSTGRES_USER" + gosu postgres postgres --single -jE <<-EOSQL + CREATE DATABASE "$POSTGRES_USER" ; EOSQL + echo fi - gosu postgres postgres --single <<-EOSQL - $op USER "$POSTGRES_USER" WITH SUPERUSER $pass + gosu postgres postgres --single -jE <<-EOSQL + $op USER "$POSTGRES_USER" WITH SUPERUSER $pass ; EOSQL + echo + { echo; echo "host all \"$POSTGRES_USER\" 0.0.0.0/0 $authMethod"; } >> "$PGDATA"/pg_hba.conf if [ -d /docker-entrypoint-initdb.d ]; then diff --git a/9.4/Dockerfile b/9.4/Dockerfile index af27f9d468..92e2752379 100644 --- a/9.4/Dockerfile +++ b/9.4/Dockerfile @@ -42,7 +42,7 @@ ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH ENV PGDATA /var/lib/postgresql/data VOLUME /var/lib/postgresql/data -COPY ./docker-entrypoint.sh / +COPY docker-entrypoint.sh / ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/9.4/docker-entrypoint.sh b/9.4/docker-entrypoint.sh index e07a76e997..28f8354f70 100755 --- a/9.4/docker-entrypoint.sh +++ b/9.4/docker-entrypoint.sh @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then pass="PASSWORD '$POSTGRES_PASSWORD'" authMethod=md5 else - # The - option suppresses leading tabs but *not* spaces. :) + # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOWARN' **************************************************** WARNING: No password has been set for the database. @@ -33,14 +33,17 @@ if [ "$1" = 'postgres' ]; then op='ALTER' else op='CREATE' - gosu postgres postgres --single -E <<-EOSQL - CREATE DATABASE "$POSTGRES_USER" + gosu postgres postgres --single -jE <<-EOSQL + CREATE DATABASE "$POSTGRES_USER" ; EOSQL + echo fi - gosu postgres postgres --single <<-EOSQL - $op USER "$POSTGRES_USER" WITH SUPERUSER $pass + gosu postgres postgres --single -jE <<-EOSQL + $op USER "$POSTGRES_USER" WITH SUPERUSER $pass ; EOSQL + echo + { echo; echo "host all \"$POSTGRES_USER\" 0.0.0.0/0 $authMethod"; } >> "$PGDATA"/pg_hba.conf if [ -d /docker-entrypoint-initdb.d ]; then diff --git a/Dockerfile.template b/Dockerfile.template index c01b0856df..0ff7b6f269 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -42,7 +42,7 @@ ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH ENV PGDATA /var/lib/postgresql/data VOLUME /var/lib/postgresql/data -COPY ./docker-entrypoint.sh / +COPY docker-entrypoint.sh / ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index e07a76e997..28f8354f70 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -15,7 +15,7 @@ if [ "$1" = 'postgres' ]; then pass="PASSWORD '$POSTGRES_PASSWORD'" authMethod=md5 else - # The - option suppresses leading tabs but *not* spaces. :) + # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOWARN' **************************************************** WARNING: No password has been set for the database. @@ -33,14 +33,17 @@ if [ "$1" = 'postgres' ]; then op='ALTER' else op='CREATE' - gosu postgres postgres --single -E <<-EOSQL - CREATE DATABASE "$POSTGRES_USER" + gosu postgres postgres --single -jE <<-EOSQL + CREATE DATABASE "$POSTGRES_USER" ; EOSQL + echo fi - gosu postgres postgres --single <<-EOSQL - $op USER "$POSTGRES_USER" WITH SUPERUSER $pass + gosu postgres postgres --single -jE <<-EOSQL + $op USER "$POSTGRES_USER" WITH SUPERUSER $pass ; EOSQL + echo + { echo; echo "host all \"$POSTGRES_USER\" 0.0.0.0/0 $authMethod"; } >> "$PGDATA"/pg_hba.conf if [ -d /docker-entrypoint-initdb.d ]; then