Skip to content

Commit

Permalink
feat(pgbouncer): rework image using wolfi as build image stage
Browse files Browse the repository at this point in the history
  • Loading branch information
f-bn committed Aug 20, 2024
1 parent 7a16d64 commit af53e08
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
24 changes: 11 additions & 13 deletions pgbouncer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
# --- Build stage ---
FROM docker.io/gcc:14.2 AS build
FROM cgr.dev/chainguard/wolfi-base:latest AS build

ARG TARGETOS
ARG TARGETARCH
ARG VERSION=1.23.1

RUN set -ex ; \
export DEBIAN_FRONTEND=noninteractive ; \
apt update ; \
apt install -y --no-install-recommends \
ca-certificates \
wget \
libc6-dev \
apk add --no-cache \
automake \
autoconf \
build-base \
c-ares-dev \
libevent-dev \
libssl-dev \
libc-ares-dev \
libpq-dev \
pkg-config
libpq \
openssl-dev

WORKDIR /build

ADD https://www.pgbouncer.org/downloads/files/${VERSION}/pgbouncer-${VERSION}.tar.gz /build/pgbouncer-${VERSION}.tar.gz
ADD https://www.pgbouncer.org/downloads/files/${VERSION}/pgbouncer-${VERSION}.tar.gz.sha256 /build/pgbouncer-${VERSION}.tar.gz.sha256

RUN set -ex ; \
wget -O pgbouncer-${VERSION}.tar.gz https://www.pgbouncer.org/downloads/files/${VERSION}/pgbouncer-${VERSION}.tar.gz ; \
wget -O pgbouncer-${VERSION}.tar.gz.sha256 https://www.pgbouncer.org/downloads/files/${VERSION}/pgbouncer-${VERSION}.tar.gz.sha256 ; \
cat pgbouncer-${VERSION}.tar.gz.sha256 | sha256sum -c ; \
tar -xzf pgbouncer-${VERSION}.tar.gz --strip-components=1

Expand Down
3 changes: 1 addition & 2 deletions pgbouncer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ Built with GCC 14.2.
### Supported PgBouncer versions

- PgBouncer 1.23.x
- PgBouncer 1.22.x

## PgBouncer configuration

By default, this image is builded with a default empty PgBouncer configuration. You can bring your own configuration to the container (e.g using Docker):
By default, this image is built with a default empty PgBouncer configuration. You can bring your own configuration to the container (e.g using Docker):

```shell
# By default, the image is looking for configuration in /etc/pgbouncer/pgbouncer.ini
Expand Down

0 comments on commit af53e08

Please sign in to comment.