1
0

Compare commits

...

34 Commits

Author SHA256 Message Date
41dbfff351 Accepting request 1243418 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1243418
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=37
2025-02-05 20:56:59 +00:00
fff6c74846 [info=4e976abea523a5636802023f2b357ba63ca12cb0]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=248
2025-02-05 10:36:10 +00:00
a4dbb73ea7 Accepting request 1241669 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1241669
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=36
2025-02-04 17:12:36 +00:00
3418097a59 Accepting request 1241246 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1241246
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=35
2025-01-31 15:03:06 +00:00
ae8cf800f9 [info=503750682f626110ee48018f32463f0c999f4a73]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=246
2025-01-30 13:51:27 +00:00
e5219486b7 Accepting request 1240974 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1240974
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=34
2025-01-29 15:16:06 +00:00
f80b83f9df [info=503750682f626110ee48018f32463f0c999f4a73]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=244
2025-01-29 15:14:54 +00:00
10c059803f [info=efe6a58bc13f5ea74de979d6f5db279ec109d832]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=242
2025-01-28 18:32:24 +00:00
c581f35e99 Accepting request 1234378 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1234378
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=33
2025-01-02 18:21:24 +00:00
70a49ece70 [info=f26c697bbb20c50a1b564d9d932b945a]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=232
2025-01-01 14:18:49 +00:00
d976e65e61 Accepting request 1228032 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1228032
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=32
2024-12-03 19:47:57 +00:00
f3790ffb31 [info=aa0a824585b756813c58fd1b13c4db00]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=225
2024-12-03 13:53:59 +00:00
424637e722 Accepting request 1224288 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1224288
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=31
2024-11-15 14:43:11 +00:00
23739dadcc [info=b7b244db0cfe86cb2b0cb8c438549888]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=217
2024-11-14 17:12:10 +00:00
00f7800b07 Accepting request 1219935 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1219935
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=30
2024-11-01 20:05:18 +00:00
b90c28342f [info=10f6c4d3f76bcac6f66c496710f9e2e7]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=208
2024-10-31 16:14:00 +00:00
f61546b5b5 Accepting request 1219644 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1219644
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=29
2024-10-30 21:57:41 +00:00
e1df066a20 Accepting request 1219148 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1219148
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=28
2024-10-30 16:35:51 +00:00
677ac1db0a [info=25386b6c5db2dc25d6fc9424f775e2bb]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=207
2024-10-30 15:42:16 +00:00
c9218df0a4 [info=fcdb7f1d565ef64398f417f9cc25d6ec]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=205
2024-10-29 15:34:47 +00:00
376f20af63 Accepting request 1207922 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1207922
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=27
2024-10-15 13:00:08 +00:00
1e80babdf3 [info=48bd718e0c8f91056355db982aa6c780]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=198
2024-10-14 11:34:36 +00:00
204a58b670 Accepting request 1207331 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1207331
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=26
2024-10-14 11:21:51 +00:00
f76f586fd7 [info=4a86bc864d08cfcd518aa0f856e77d67]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=197
2024-10-11 15:27:45 +00:00
46e7bbfed3 Accepting request 1203695 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1203695
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=25
2024-09-26 16:53:34 +00:00
38436efad5 Accepting request 1203115 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1203115
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=24
2024-09-25 19:53:39 +00:00
9823f194d5 [info=2ed020fa69e52bc321a9b6e52bc21a20]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=188
2024-09-25 17:58:45 +00:00
dbb34af6d4 [info=12ce8e64eb411a759e67b1ce290d8be9]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=187
2024-09-25 17:19:24 +00:00
fc21a28f73 [info=0a88d1c2873e629ee0193755ef125266]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=185
2024-09-25 10:28:42 +00:00
7ffd61e37a [info=66a29f3eae225795b371870bcb1a2366]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=183
2024-09-24 20:06:10 +00:00
7c9c433112 Accepting request 1200615 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1200615
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=23
2024-09-12 14:58:21 +00:00
7fce510386 [info=870f83466f3ec6420d612686e1563a7a]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=171
2024-09-12 10:46:51 +00:00
990b41649c Accepting request 1199641 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS

OBS-URL: https://build.opensuse.org/request/show/1199641
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgres-14-image?expand=0&rev=22
2024-09-09 12:45:43 +00:00
4e316f3425 [info=b0729f4635aa210cf5b6f113dabe0f1a]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-14-image?expand=0&rev=166
2024-09-09 07:30:42 +00:00
5 changed files with 113 additions and 17 deletions

View File

@ -1,6 +1,6 @@
# SPDX-License-Identifier: PostgreSQL
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -13,28 +13,34 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
# You can contact the BCI team via https://github.com/SUSE/bci/discussions
#!UseOBSRepositories
#!BuildTag: opensuse/postgres:%%pg_patch_version%%-%RELEASE%
#!BuildTag: opensuse/postgres:%%pg_patch_version%%
#!BuildTag: opensuse/postgres:14
#!BuildTag: opensuse/postgres:14-%RELEASE%
#!BuildTag: opensuse/postgres:%%pg_version%%
#!BuildTag: opensuse/postgres:%%pg_version%%-%RELEASE%
#!BuildTag: opensuse/postgres:%%pg_minor_version%%
FROM opensuse/tumbleweed:latest
RUN set -euo pipefail; zypper -n in --no-recommends postgresql14-server findutils; zypper -n clean; rm -rf /var/log/{lastlog,tallylog,zypper.log,zypp/history,YaST2}
FROM opensuse/bci/bci-micro:latest AS target
FROM opensuse/tumbleweed:latest AS builder
COPY --from=target / /target
RUN set -euo pipefail; \
zypper -n --installroot /target --gpg-auto-import-keys install --no-recommends libpq5 postgresql14-server findutils coreutils sed util-linux; \
zypper -n clean; \
rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2}
FROM opensuse/bci/bci-micro:latest
COPY --from=builder /target /
# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=org.opensuse.application.postgres
LABEL org.opencontainers.image.authors="openSUSE (https://www.opensuse.org/)"
LABEL org.opencontainers.image.title="openSUSE Tumbleweed PostgreSQL 14"
LABEL org.opencontainers.image.description="PostgreSQL 14 container based on the openSUSE Tumbleweed Base Container Image."
LABEL org.opencontainers.image.version="14"
LABEL org.opencontainers.image.version="%%pg_patch_version%%"
LABEL org.opencontainers.image.url="https://www.opensuse.org"
LABEL org.opencontainers.image.created="%BUILDTIME%"
LABEL org.opencontainers.image.vendor="openSUSE Project"
LABEL org.opencontainers.image.source="%SOURCEURL%"
LABEL org.opencontainers.image.ref.name="14-%RELEASE%"
LABEL org.opensuse.reference="registry.opensuse.org/opensuse/postgres:14-%RELEASE%"
LABEL org.opencontainers.image.ref.name="%%pg_patch_version%%-%RELEASE%"
LABEL org.opensuse.reference="registry.opensuse.org/opensuse/postgres:%%pg_patch_version%%-%RELEASE%"
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime#openSUSE_BCI"
LABEL org.opensuse.release-stage="released"
@ -42,12 +48,12 @@ LABEL org.opensuse.release-stage="released"
LABEL io.artifacthub.package.readme-url="https://raw.githubusercontent.com/SUSE/BCI-dockerfile-generator/Tumbleweed/postgres-14-image/README.md"
ENV LANG="en_US.utf8"
ENV PG_MAJOR="14"
ENV PG_VERSION="%%pg_version%%"
ENV PG_VERSION="%%pg_minor_version%%"
ENV PGDATA="/var/lib/pgsql/data"
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["postgres"]
EXPOSE 5432
EXPOSE 5432/tcp
COPY docker-entrypoint.sh /usr/local/bin/
RUN set -euo pipefail; chmod +x /usr/local/bin/docker-entrypoint.sh; \
sed -i -e 's/exec gosu postgres "/exec setpriv --reuid=postgres --regid=postgres --clear-groups -- "/g' /usr/local/bin/docker-entrypoint.sh; \

View File

@ -24,6 +24,10 @@ $ podman run -it --rm -p 5432:5432 -e POSTGRES_PASSWORD=my-password -v /path/to/
PostgreSQL data directory location.
**Note 1:** The directory must be empty for `initdb` to create a new database.
**Note 2:** If the volume points either to a file system mount point, a remote folder that cannot be owned by the `postgres` user, or a location that already contains files (including `lost+found` and dotfiles), a new subdirectory for storing the PostgreSQL data must be created within the `PGDATA` volume.
## Environment variables
The PostgreSQL image uses several environment variables to configure the database initialization.

View File

@ -1,10 +1,16 @@
<services>
<service mode="buildtime" name="docker_label_helper"/>
<service mode="buildtime" name="kiwi_metainfo_helper"/>
<service name="replace_using_package_version" mode="buildtime">
<service mode="buildtime" name="replace_using_package_version">
<param name="file">Dockerfile</param>
<param name="regex">%%pg_version%%</param>
<param name="regex">%%pg_minor_version%%</param>
<param name="package">postgresql14-server</param>
<param name="parse-version">minor</param>
</service>
<service mode="buildtime" name="replace_using_package_version">
<param name="file">Dockerfile</param>
<param name="regex">%%pg_patch_version%%</param>
<param name="package">postgresql14-server</param>
<param name="parse-version">patch</param>
</service>
</services>

View File

@ -104,7 +104,7 @@ docker_init_database_dir() {
# assumes database is not set up, ie: [ -z "$DATABASE_ALREADY_EXISTS" ]
docker_verify_minimum_env() {
case "${PG_MAJOR:-}" in
12 | 13) # https://github.com/postgres/postgres/commit/67a472d71c98c3d2fa322a1b4013080b20720b98
13) # https://github.com/postgres/postgres/commit/67a472d71c98c3d2fa322a1b4013080b20720b98
# check password first so we can output the warning before postgres
# messes it up
if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then
@ -252,7 +252,7 @@ pg_setup_hba_conf() {
printf '\n'
if [ 'trust' = "$POSTGRES_HOST_AUTH_METHOD" ]; then
printf '# warning trust is enabled for all connections\n'
printf '# see https://www.postgresql.org/docs/12/auth-trust.html\n'
printf '# see https://www.postgresql.org/docs/17/auth-trust.html\n'
fi
printf 'host all all all %s\n' "$POSTGRES_HOST_AUTH_METHOD"
} >> "$PGDATA/pg_hba.conf"

View File

@ -1,3 +1,83 @@
-------------------------------------------------------------------
Wed Feb 5 10:30:31 UTC 2025 - SUSE Update Bot <bci-internal@suse.de>
- remove handling for outdated postgresql versions
-------------------------------------------------------------------
Wed Jan 29 14:06:29 UTC 2025 - SUSE Update Bot <bci-internal@suse.de>
- update README to add hints about the persistent volume requirements
-------------------------------------------------------------------
Wed Jan 1 14:13:48 UTC 2025 - SUSE Update Bot <bci-internal@suse.de>
- update copyright year
-------------------------------------------------------------------
Tue Dec 3 13:26:37 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
- Change attribute order in _service
-------------------------------------------------------------------
Thu Nov 14 17:06:30 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
- switch to multistage build
-------------------------------------------------------------------
Wed Oct 30 18:28:27 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
- be explicit in protocol for expose statement
-------------------------------------------------------------------
Wed Oct 30 15:34:45 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
- remove nonsensical org.opencontainers.image.authors - duplication of .vendor
-------------------------------------------------------------------
Tue Oct 29 15:23:20 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
- drop tag_version-%RELEASE%
-------------------------------------------------------------------
Mon Oct 14 11:26:26 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
- make the version-%release tag the first one listed; remove duplicates where they existed; update image.ref/reference to point to the version-%release(-) tag
-------------------------------------------------------------------
Fri Oct 11 15:12:52 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
- make the tag with -%RELEASE% the first tag listed
-------------------------------------------------------------------
Wed Sep 25 17:36:16 UTC 2024 - Dirk Mueller <dmueller@suse.com>
- rerender installation step in multiple lines, allow uninstalling optional packages
-------------------------------------------------------------------
Wed Sep 25 17:12:11 UTC 2024 - Dirk Mueller <dmueller@suse.com>
- improved log cleaning
-------------------------------------------------------------------
Wed Sep 25 10:02:07 UTC 2024 - Dirk Mueller <dmueller@suse.com>
- install libpq5 to avoid have-choice errors
-------------------------------------------------------------------
Tue Sep 24 20:00:32 UTC 2024 - Dirk Mueller <dmueller@suse.com>
- remove release tags for additional_versions
-------------------------------------------------------------------
Thu Sep 12 10:37:22 UTC 2024 - Dirk Mueller <dmueller@suse.com>
- set useobsrepositories explicitly
-------------------------------------------------------------------
Mon Sep 9 07:25:11 UTC 2024 - Dirk Mueller <dmueller@suse.com>
- set full version on labels and tags
-------------------------------------------------------------------
Fri Aug 16 07:07:46 UTC 2024 - Dirk Mueller <dmueller@suse.com>