2022-04-27 14:18:08 +02:00
|
|
|
# SPDX-License-Identifier: MIT
|
2022-07-18 16:05:07 +02:00
|
|
|
#!BuildTag: opensuse/postgres:12
|
|
|
|
#!BuildTag: opensuse/postgres:12-%RELEASE%
|
|
|
|
#!BuildTag: opensuse/postgres:%%pg_version%%
|
2023-02-21 09:49:43 +01:00
|
|
|
#!BuildTag: opensuse/postgres:%%pg_version%%-%RELEASE%
|
2022-11-23 10:33:14 +01:00
|
|
|
|
2022-04-27 14:18:08 +02:00
|
|
|
FROM opensuse/tumbleweed:latest
|
|
|
|
|
2022-07-18 16:05:07 +02:00
|
|
|
MAINTAINER openSUSE (https://www.opensuse.org/)
|
2022-04-27 14:18:08 +02:00
|
|
|
|
|
|
|
# Define labels according to https://en.opensuse.org/Building_derived_containers
|
2022-07-18 16:05:07 +02:00
|
|
|
# labelprefix=org.opensuse.application.postgres
|
|
|
|
LABEL org.opencontainers.image.title="openSUSE Tumbleweed PostgreSQL 12 Container Image"
|
|
|
|
LABEL org.opencontainers.image.description="PostgreSQL 12 based on the openSUSE Tumbleweed Base Container Image."
|
2022-04-27 14:18:08 +02:00
|
|
|
LABEL org.opencontainers.image.version="12"
|
2022-07-18 16:05:07 +02:00
|
|
|
LABEL org.opencontainers.image.url="https://www.opensuse.org"
|
2022-04-27 14:18:08 +02:00
|
|
|
LABEL org.opencontainers.image.created="%BUILDTIME%"
|
2022-07-18 16:05:07 +02:00
|
|
|
LABEL org.opencontainers.image.vendor="openSUSE Project"
|
|
|
|
LABEL org.opensuse.reference="registry.opensuse.org/opensuse/postgres:12-%RELEASE%"
|
2022-04-27 14:18:08 +02:00
|
|
|
LABEL org.openbuildservice.disturl="%DISTURL%"
|
2022-07-18 16:05:07 +02:00
|
|
|
|
|
|
|
LABEL com.suse.release-stage="released"
|
2022-04-27 14:18:08 +02:00
|
|
|
# endlabelprefix
|
|
|
|
|
2022-05-04 09:53:31 +02:00
|
|
|
RUN set -euo pipefail; zypper -n in --no-recommends postgresql12-server distribution-release; zypper -n clean; rm -rf /var/log/*
|
2022-04-27 14:18:08 +02:00
|
|
|
ENV LANG="en_US.utf8"
|
|
|
|
ENV PG_MAJOR="12"
|
|
|
|
ENV PG_VERSION="%%pg_version%%"
|
|
|
|
ENV PGDATA="/var/lib/postgresql/data"
|
2022-11-23 10:33:14 +01:00
|
|
|
|
2022-04-27 14:18:08 +02:00
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
|
|
CMD ["postgres"]
|
|
|
|
VOLUME /var/lib/postgresql/data
|
2022-11-23 10:33:14 +01:00
|
|
|
EXPOSE 5432
|
2022-04-27 14:18:08 +02:00
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
2022-05-04 09:53:31 +02:00
|
|
|
RUN set -euo pipefail; chmod +x /usr/local/bin/docker-entrypoint.sh; \
|
|
|
|
ln -s su /usr/bin/gosu; \
|
|
|
|
mkdir /docker-entrypoint-initdb.d; \
|
2022-04-27 14:18:08 +02:00
|
|
|
sed -ri "s|^#?(listen_addresses)\s*=\s*\S+.*|\1 = '*'|" /usr/share/postgresql12/postgresql.conf.sample
|
|
|
|
|
|
|
|
STOPSIGNAL SIGINT
|