diff --git a/Dockerfile b/Dockerfile index 3e48dc6..6fbef7f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ #!BuildTag: opensuse/postgres:13 #!BuildTag: opensuse/postgres:13-%RELEASE% #!BuildTag: opensuse/postgres:%%pg_version%% + FROM opensuse/tumbleweed:latest MAINTAINER openSUSE (https://www.opensuse.org/) @@ -20,18 +21,16 @@ LABEL org.openbuildservice.disturl="%DISTURL%" LABEL com.suse.release-stage="released" # endlabelprefix - RUN set -euo pipefail; zypper -n in --no-recommends postgresql13-server distribution-release; zypper -n clean; rm -rf /var/log/* - ENV LANG="en_US.utf8" ENV PG_MAJOR="13" ENV PG_VERSION="%%pg_version%%" ENV PGDATA="/var/lib/postgresql/data" + ENTRYPOINT ["docker-entrypoint.sh"] CMD ["postgres"] - VOLUME /var/lib/postgresql/data - +EXPOSE 5432 COPY docker-entrypoint.sh /usr/local/bin/ RUN set -euo pipefail; chmod +x /usr/local/bin/docker-entrypoint.sh; \ ln -s su /usr/bin/gosu; \ @@ -39,4 +38,3 @@ RUN set -euo pipefail; chmod +x /usr/local/bin/docker-entrypoint.sh; \ sed -ri "s|^#?(listen_addresses)\s*=\s*\S+.*|\1 = '*'|" /usr/share/postgresql13/postgresql.conf.sample STOPSIGNAL SIGINT -EXPOSE 5432 diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..02387b4 --- /dev/null +++ b/_constraints @@ -0,0 +1,7 @@ + + + + 8 + + + diff --git a/_service b/_service index c2b21e1..0d3b282 100644 --- a/_service +++ b/_service @@ -1,11 +1,10 @@ - + Dockerfile %%pg_version%% postgresql13-server minor - \ No newline at end of file diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index c53f073..d78e614 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -45,7 +45,7 @@ docker_create_db_directories() { chmod 775 /var/run/postgresql || : # Create the transaction log directory before initdb is run so the directory is owned by the correct user - if [ -n "$POSTGRES_INITDB_WALDIR" ]; then + if [ -n "${POSTGRES_INITDB_WALDIR:-}" ]; then mkdir -p "$POSTGRES_INITDB_WALDIR" if [ "$user" = '0' ]; then find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' + @@ -84,7 +84,7 @@ docker_init_database_dir() { done fi - if [ -n "$POSTGRES_INITDB_WALDIR" ]; then + if [ -n "${POSTGRES_INITDB_WALDIR:-}" ]; then set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@" fi @@ -172,10 +172,11 @@ docker_process_init_files() { . "$f" fi ;; - *.sql) echo "$0: running $f"; docker_process_sql -f "$f"; echo ;; - *.sql.gz) echo "$0: running $f"; gunzip -c "$f" | docker_process_sql; echo ;; - *.sql.xz) echo "$0: running $f"; xzcat "$f" | docker_process_sql; echo ;; - *) echo "$0: ignoring $f" ;; + *.sql) echo "$0: running $f"; docker_process_sql -f "$f"; echo ;; + *.sql.gz) echo "$0: running $f"; gunzip -c "$f" | docker_process_sql; echo ;; + *.sql.xz) echo "$0: running $f"; xzcat "$f" | docker_process_sql; echo ;; + *.sql.zst) echo "$0: running $f"; zstd -dc "$f" | docker_process_sql; echo ;; + *) echo "$0: ignoring $f" ;; esac echo done @@ -240,10 +241,6 @@ pg_setup_hba_conf() { local auth # check the default/configured encryption and use that as the auth method auth="$(postgres -C password_encryption "$@")" - # postgres 9 only reports "on" and not "md5" - if [ "$auth" = 'on' ]; then - auth='md5' - fi : "${POSTGRES_HOST_AUTH_METHOD:=$auth}" { echo diff --git a/postgres-13-image.changes b/postgres-13-image.changes index 75ca8ad..6382f36 100644 --- a/postgres-13-image.changes +++ b/postgres-13-image.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Nov 21 13:47:17 UTC 2022 - Dan Čermák + +- Add _constraints to prevent FTBFS with small worker root partitions + ------------------------------------------------------------------- Fri Jul 15 11:08:47 UTC 2022 - Dan Čermák