-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile.pkg
More file actions
73 lines (60 loc) · 2.94 KB
/
Copy pathContainerfile.pkg
File metadata and controls
73 lines (60 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# --------------------------------------------------------------------------
# THIS FILE IS AUTOGENERATED - DO NOT EDIT MANUALLY
#
# Source: Containerfile.pkg.j2
# --------------------------------------------------------------------------
ARG PG_VERSION=18
# Builder: pgaudit from source
FROM ghcr.io/daemonless/postgres:${PG_VERSION} AS builder-pgaudit
ARG PG_VERSION
ARG PGAUDIT_VERSION
RUN pkg update && pkg install -y \
FreeBSD-bmake FreeBSD-clibs-dev FreeBSD-clang FreeBSD-clang-dev FreeBSD-toolchain \
gmake pkgconf openssl && \
pkg clean -ay && rm -rf /var/cache/pkg/* /var/db/pkg/repos/*
RUN fetch -qo /tmp/pgaudit.tar.gz \
"https://github.com/pgaudit/pgaudit/archive/refs/tags/${PGAUDIT_VERSION}.tar.gz" && \
tar -xzf /tmp/pgaudit.tar.gz -C /tmp && \
cd /tmp/pgaudit-${PGAUDIT_VERSION} && \
gmake USE_PGXS=1 install && \
rm -rf /tmp/pgaudit*
# Builder: pg_failover_slots from source
FROM ghcr.io/daemonless/postgres:${PG_VERSION} AS builder-failover-slots
ARG PG_VERSION
ARG PG_FAILOVER_SLOTS_VERSION
RUN pkg update && pkg install -y \
FreeBSD-bmake FreeBSD-clibs-dev FreeBSD-clang FreeBSD-clang-dev FreeBSD-toolchain \
gmake pkgconf openssl && \
pkg clean -ay && rm -rf /var/cache/pkg/* /var/db/pkg/repos/*
RUN fetch -qo /tmp/pg_failover_slots.tar.gz \
"https://github.com/EnterpriseDB/pg_failover_slots/archive/refs/tags/v${PG_FAILOVER_SLOTS_VERSION}.tar.gz" && \
tar -xzf /tmp/pg_failover_slots.tar.gz -C /tmp && \
cd /tmp/pg_failover_slots-${PG_FAILOVER_SLOTS_VERSION} && \
gmake USE_PGXS=1 install && \
rm -rf /tmp/pg_failover_slots*
# Production image
FROM ghcr.io/daemonless/postgres:${PG_VERSION}
ARG PG_VERSION
ARG FREEBSD_ARCH=amd64
# --- Metadata (Injected by Generator) ---
LABEL org.opencontainers.image.title="PostgreSQL (CloudNativePG) ${PG_VERSION}" \
org.opencontainers.image.description="PostgreSQL on FreeBSD, compatible with the CloudNativePG Kubernetes operator. Includes pgvector, pgaudit, and pg_failover_slots." \
org.opencontainers.image.source="https://github.com/daemonless/cnpg-postgres" \
org.opencontainers.image.url="https://cloudnative-pg.io/" \
org.opencontainers.image.documentation="https://www.postgresql.org/docs/${PG_VERSION}/" \
org.opencontainers.image.licenses="PostgreSQL" \
org.opencontainers.image.vendor="daemonless" \
org.opencontainers.image.authors="daemonless" \
io.daemonless.category="Databases" \
io.daemonless.volumes="/var/lib/postgresql/data" \
io.daemonless.arch="${FREEBSD_ARCH}"
COPY --from=builder-pgaudit \
/usr/local/lib/postgresql/pgaudit.so \
/usr/local/lib/postgresql/
COPY --from=builder-pgaudit \
/usr/local/share/postgresql/extension/pgaudit* \
/usr/local/share/postgresql/extension/
COPY --from=builder-failover-slots \
/usr/local/lib/postgresql/pg_failover_slots.so \
/usr/local/lib/postgresql/
# No ENTRYPOINT or CMD — CloudNativePG overrides with its instance manager