[TR] Distroless tabanı üzerine inşa edilmiş minimal PgBouncer imajları. Shell, paket yöneticisi ve gereksiz binary dosyaları içermez; üretim ortamları için saldırı yüzeyi en aza indirilmiştir.
[EN] Minimal PgBouncer images built on a Distroless base. They contain no shell, package manager or unnecessary binaries, keeping the attack surface to a minimum for production environments.
| Etiket / Tag | Taban / Base | Bağlama / Linking | Açıklama / Description |
|---|---|---|---|
latest | gcr.io/distroless/base-debian13:nonroot | Dinamik / Dynamic | Debian 13 kütüphaneleri (glibc, OpenSSL) kullanır. / Uses Debian 13 libraries (glibc, OpenSSL). |
static | gcr.io/distroless/static-debian13:nonroot | Statik / Static | Alpine (musl) ile derlenmiş tek binary; imajda glibc veya OpenSSL paketi yoktur. / Single binary built with Alpine (musl); the image contains no glibc or OpenSSL packages. |
[TR] Hangisini seçmeliyim? Debian paket ekosistemine bağlı kalmak istiyorsanız latest; en küçük imajı ve en temiz güvenlik taramasını istiyorsanız static.
[EN] Which one should I use? Choose latest to stay on Debian's package ecosystem; choose static for the smallest image and the cleanest security scan.
[TR] Not: static imajında OpenSSL, libevent ve c-ares binary'nin içine gömülüdür. Tarayıcılar (Trivy vb.) bu kütüphaneleri paket olarak göremez; imaj, kütüphanelerin güncel kalması için düzenli olarak yeniden derlenir.
[EN] Note: In the static image, OpenSSL, libevent and c-ares are embedded in the binary. Scanners (Trivy, etc.) cannot see these libraries as packages; the image is rebuilt regularly to keep them up to date.
nonroot kullanıcısı (UID 65532) ile çalışır. / Runs as the nonroot user (UID 65532).| Bileşen / Component | latest | static |
|---|---|---|
| PgBouncer | 1.26.1 | 1.26.1 |
| libevent | 2.1.13-stable | 2.1.13-stable |
| c-ares | 1.34.9 | 1.34.9 |
| OpenSSL | 3.5.7 | 3.5.9 |
| C kütüphanesi / C library | glibc 2.41 | musl |
[TR] Distroless imajda dosya sistemi kısıtlıdır. pidfile ve unix_socket_dir yolları yazma izni olan /tmp dizinine yönlendirilmelidir.
[EN] The filesystem is restricted in Distroless. pidfile and unix_socket_dir must point to /tmp, which is writable.
pgbouncer.ini:
[pgbouncer]
listen_addr = 0.0.0.0
listen_port = 6432
auth_file = /etc/pgbouncer/userlist.txt
unix_socket_dir = /tmp
pidfile = /tmp/pgbouncer.pid
[TR] Aşağıdaki örneklerde latest yerine static etiketini de kullanabilirsiniz.
[EN] You can use the static tag instead of latest in the examples below.
Bash/Terminal
docker run -d \
--name pgbouncer \
-p 6432:6432 \
-v $(pwd)/pgbouncer.ini:/etc/pgbouncer/pgbouncer.ini:ro \
-v $(pwd)/userlist.txt:/etc/pgbouncer/userlist.txt:ro \
msecapps/pgbouncer:latest
Docker Compose
services:
pgbouncer:
image: msecapps/pgbouncer:latest # veya / or: msecapps/pgbouncer:static
container_name: pgbouncer
ports:
- "6432:6432"
volumes:
- ./pgbouncer.ini:/etc/pgbouncer/pgbouncer.ini:ro
- ./userlist.txt:/etc/pgbouncer/userlist.txt:ro
restart: always
[TR] İmajlarda psql bulunmaz. Yönetim konsoluna kendi makinenizden veya geçici bir konteynerden bağlanın (kullanıcı pgbouncer.ini içindeki admin_users listesinde olmalıdır):
[EN] The images do not include psql. Connect to the admin console from your own machine or a temporary container (the user must be listed in admin_users in pgbouncer.ini):
docker run --rm -it postgres:18-alpine \
psql -h <pgbouncer-host> -p 6432 -U <admin_user> pgbouncer -c "SHOW POOLS;"
[TR] İmajlarda shell olmadığı için HEALTHCHECK komutu kullanılamaz. Kubernetes'te TCP kontrolü önerilir:
[EN] Since the images have no shell, HEALTHCHECK commands cannot be used. In Kubernetes, use a TCP probe:
livenessProbe:
tcpSocket:
port: 6432
docker run --rm msecapps/pgbouncer:latest --version
docker run --rm msecapps/pgbouncer:static --version
Maintainer: Github.
Content type
Image
Digest
sha256:992a99a68…
Size
11 MB
Last updated
2 days ago
docker pull msecapps/pgbouncer