forked from pool/postgres-12-image
[info=cbb0aece97fc13b1d48d096c5c5c85f8]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-12-image?expand=0&rev=4
This commit is contained in:
parent
c24f969898
commit
6b251b8ea4
@ -2,6 +2,7 @@
|
|||||||
#!BuildTag: opensuse/postgres:12
|
#!BuildTag: opensuse/postgres:12
|
||||||
#!BuildTag: opensuse/postgres:12-%RELEASE%
|
#!BuildTag: opensuse/postgres:12-%RELEASE%
|
||||||
#!BuildTag: opensuse/postgres:%%pg_version%%
|
#!BuildTag: opensuse/postgres:%%pg_version%%
|
||||||
|
|
||||||
FROM opensuse/tumbleweed:latest
|
FROM opensuse/tumbleweed:latest
|
||||||
|
|
||||||
MAINTAINER openSUSE (https://www.opensuse.org/)
|
MAINTAINER openSUSE (https://www.opensuse.org/)
|
||||||
@ -20,18 +21,16 @@ LABEL org.openbuildservice.disturl="%DISTURL%"
|
|||||||
LABEL com.suse.release-stage="released"
|
LABEL com.suse.release-stage="released"
|
||||||
# endlabelprefix
|
# endlabelprefix
|
||||||
|
|
||||||
|
|
||||||
RUN set -euo pipefail; zypper -n in --no-recommends postgresql12-server distribution-release; zypper -n clean; rm -rf /var/log/*
|
RUN set -euo pipefail; zypper -n in --no-recommends postgresql12-server distribution-release; zypper -n clean; rm -rf /var/log/*
|
||||||
|
|
||||||
ENV LANG="en_US.utf8"
|
ENV LANG="en_US.utf8"
|
||||||
ENV PG_MAJOR="12"
|
ENV PG_MAJOR="12"
|
||||||
ENV PG_VERSION="%%pg_version%%"
|
ENV PG_VERSION="%%pg_version%%"
|
||||||
ENV PGDATA="/var/lib/postgresql/data"
|
ENV PGDATA="/var/lib/postgresql/data"
|
||||||
|
|
||||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
CMD ["postgres"]
|
CMD ["postgres"]
|
||||||
|
|
||||||
VOLUME /var/lib/postgresql/data
|
VOLUME /var/lib/postgresql/data
|
||||||
|
EXPOSE 5432
|
||||||
COPY docker-entrypoint.sh /usr/local/bin/
|
COPY docker-entrypoint.sh /usr/local/bin/
|
||||||
RUN set -euo pipefail; chmod +x /usr/local/bin/docker-entrypoint.sh; \
|
RUN set -euo pipefail; chmod +x /usr/local/bin/docker-entrypoint.sh; \
|
||||||
ln -s su /usr/bin/gosu; \
|
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/postgresql12/postgresql.conf.sample
|
sed -ri "s|^#?(listen_addresses)\s*=\s*\S+.*|\1 = '*'|" /usr/share/postgresql12/postgresql.conf.sample
|
||||||
|
|
||||||
STOPSIGNAL SIGINT
|
STOPSIGNAL SIGINT
|
||||||
EXPOSE 5432
|
|
||||||
|
7
_constraints
Normal file
7
_constraints
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<constraints>
|
||||||
|
<hardware>
|
||||||
|
<disk>
|
||||||
|
<size unit="G">8</size>
|
||||||
|
</disk>
|
||||||
|
</hardware>
|
||||||
|
</constraints>
|
3
_service
3
_service
@ -1,11 +1,10 @@
|
|||||||
<services>
|
<services>
|
||||||
<service mode="buildtime" name="kiwi_metainfo_helper"/>
|
<service mode="buildtime" name="kiwi_metainfo_helper"/>
|
||||||
<service mode="buildtime" name="docker_label_helper"/>
|
<service mode="buildtime" name="docker_label_helper"/>
|
||||||
<service name="replace_using_package_version" mode="buildtime">
|
<service name="replace_using_package_version" mode="buildtime">
|
||||||
<param name="file">Dockerfile</param>
|
<param name="file">Dockerfile</param>
|
||||||
<param name="regex">%%pg_version%%</param>
|
<param name="regex">%%pg_version%%</param>
|
||||||
<param name="package">postgresql12-server</param>
|
<param name="package">postgresql12-server</param>
|
||||||
<param name="parse-version">minor</param>
|
<param name="parse-version">minor</param>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
</services>
|
</services>
|
@ -45,7 +45,7 @@ docker_create_db_directories() {
|
|||||||
chmod 775 /var/run/postgresql || :
|
chmod 775 /var/run/postgresql || :
|
||||||
|
|
||||||
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
|
# 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"
|
mkdir -p "$POSTGRES_INITDB_WALDIR"
|
||||||
if [ "$user" = '0' ]; then
|
if [ "$user" = '0' ]; then
|
||||||
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
|
||||||
@ -84,7 +84,7 @@ docker_init_database_dir() {
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
|
if [ -n "${POSTGRES_INITDB_WALDIR:-}" ]; then
|
||||||
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -172,10 +172,11 @@ docker_process_init_files() {
|
|||||||
. "$f"
|
. "$f"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*.sql) echo "$0: running $f"; docker_process_sql -f "$f"; echo ;;
|
*.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.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.xz) echo "$0: running $f"; xzcat "$f" | docker_process_sql; echo ;;
|
||||||
*) echo "$0: ignoring $f" ;;
|
*.sql.zst) echo "$0: running $f"; zstd -dc "$f" | docker_process_sql; echo ;;
|
||||||
|
*) echo "$0: ignoring $f" ;;
|
||||||
esac
|
esac
|
||||||
echo
|
echo
|
||||||
done
|
done
|
||||||
@ -240,10 +241,6 @@ pg_setup_hba_conf() {
|
|||||||
local auth
|
local auth
|
||||||
# check the default/configured encryption and use that as the auth method
|
# check the default/configured encryption and use that as the auth method
|
||||||
auth="$(postgres -C password_encryption "$@")"
|
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}"
|
: "${POSTGRES_HOST_AUTH_METHOD:=$auth}"
|
||||||
{
|
{
|
||||||
echo
|
echo
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 21 13:47:17 UTC 2022 - Dan Čermák <dcermak@suse.com>
|
||||||
|
|
||||||
|
- Add _constraints to prevent FTBFS with small worker root partitions
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 15 11:08:54 UTC 2022 - Dan Čermák <dcermak@suse.com>
|
Fri Jul 15 11:08:54 UTC 2022 - Dan Čermák <dcermak@suse.com>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user