mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 07:09:25 +02:00
build multi-arch pooler image (#3077)
* build multi-arch pooler image * add pooler build step in delivery.yaml and bump pooler version * pull from docker hub not zalando registry * add pooler step to ghcr workflow * pass infra roles to auth file via pooler entrypoint * introduce extra pooler secret for mounting auth_file * use pbgouncer as image name and push to ghcr on next merge * build with latest pgbouncer * integrate new image in e2e process and update pooler image default * update pooler build dependencies * build pooler image for e2e test * more Makefile and e2e run script tweaking --------- Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
This commit is contained in:
co-authored by
Ida Novindasari
parent
97f4de7cc0
commit
e1713705f4
@@ -0,0 +1,54 @@
|
||||
ARG BASE_IMAGE=alpine:3.22
|
||||
FROM ${BASE_IMAGE} AS build_stage
|
||||
|
||||
RUN apk add -U --no-cache \
|
||||
autoconf \
|
||||
automake \
|
||||
curl \
|
||||
gcc \
|
||||
libc-dev \
|
||||
libevent \
|
||||
libevent-dev \
|
||||
libtool \
|
||||
make \
|
||||
openssl-dev \
|
||||
pkgconfig \
|
||||
git
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
RUN git clone --single-branch --depth 1 https://github.com/pgbouncer/pgbouncer.git . && \
|
||||
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
|
||||
|
||||
RUN git submodule init && git submodule update
|
||||
|
||||
RUN ./autogen.sh && \
|
||||
./configure --prefix=/pgbouncer --with-libevent=/usr/lib && \
|
||||
sed -i '/dist_man_MANS/d' Makefile && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
RUN apk -U upgrade --no-cache \
|
||||
&& apk --no-cache add bash c-ares ca-certificates gettext libevent openssl postgresql-client
|
||||
|
||||
RUN addgroup -g 101 -S pgbouncer && \
|
||||
adduser -u 100 -S pgbouncer -G pgbouncer && \
|
||||
mkdir -p /etc/pgbouncer /var/log/pgbouncer /var/run/pgbouncer /etc/ssl/certs
|
||||
|
||||
COPY --from=build_stage /pgbouncer/bin/pgbouncer /bin/pgbouncer
|
||||
COPY pgbouncer.ini.tmpl /etc/pgbouncer/
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
RUN chown -R pgbouncer:pgbouncer \
|
||||
/var/log/pgbouncer \
|
||||
/var/run/pgbouncer \
|
||||
/etc/pgbouncer \
|
||||
/etc/ssl/certs \
|
||||
&& chmod +x /entrypoint.sh
|
||||
|
||||
USER pgbouncer:pgbouncer
|
||||
WORKDIR /etc/pgbouncer
|
||||
|
||||
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user