Public | Automated Build

Last pushed: 2 years ago
Short Description
Docker unofficial Image packaging for PgBouncer
Full Description

Supported tags and respective Dockerfile links

For more information about this image and its history, please see the relevant manifest pgbouncer/manifest file.

What is PgBouncer?

PgBouncer is an open source lightweight connection pooler for PostgreSQL. Provides a low memory requirements (2K per connection by default) and several levels of brutality when rotating connections:

  • session pooling
  • statement pooling
  • transaction pooling


  • online reconfiguration for most of the settings
  • restart/upgrade without dropping client connections
  • multi server backend, the destination databases can reside on different hosts


  • Since PgBouncer implements V3 protocol only, backend version must be >= 7.4.
  • Supported SQL features are limited within pooling modes

You can find more information about pgbouncer configuration and usage here

How to use this image

You can start a pgbouncer instance directly with official postgres image container link:

$ docker run --name certain-pgbouncer --link some-postgres:postgres -p 6432:6432 -d kafka/pgbouncer

or you can manually configure via special environment variables as follows:

docker run \
  -e "POSTGRES_PORT=tcp://" \
  -e "POSTGRES_ENV_POSTGRES_DB=postgres" \
  -e "POSTGRES_ENV_POSTGRES_PASSWORD=mysecretpassword" \
  -p 6432:6432/tcp \
  -d --restart=always kafka/pgbouncer

By default pgbouncer instance binds to: You can change that and other behavior by providing optional environment variables.


docker run \
  -e "listen_addr=" \
  -e "listen_port=6432" \
  -e "pool_mode=session" \
  -e "default_pool_size=20" \
  -e "max_client_conn=100" \
  -p 6432:6432/tcp \
  -d --restart=always kafka/pgbouncer

As you can mention this example contains default values of parameters from pgbouncer config.

Supported Docker versions

This image is officially supported on Docker version 1.10.3.

Support for older versions (down to 1.6) is provided on a best-effort basis.

Please see the Docker installation documentation for details on how to upgrade your Docker daemon.

User Feedback


If you have any problems with or questions about this image, please contact through a GitHub issue.


You are invited to contribute new features, fixes, or updates, large or small; It is always thrilled to receive pull requests, and process them.

Before you start to code, it is recommend discussing your plans through a GitHub issue, especially for ambitious contributions.

Docker Pull Command
Source Repository