pgadmin4

Provides pgAdmin 4, the open-source web-based administration and management interface for PostgreSQL databases.

adminer, metabase, dbeaver, postgres

What is pgadmin4?

The pgadmin4 image runs pgAdmin 4, the most widely used open-source graphical administration tool for PostgreSQL. It provides a browser-based interface for managing database servers, running SQL queries, inspecting schemas, monitoring activity, managing users and permissions, and performing backup and restore operations.

It is used by database administrators, developers, and data engineers who need a visual interface for PostgreSQL without installing a native desktop client. The image is commonly deployed as part of a local development Compose stack or as an internal-facing web service in development and staging environments.

How to use this image

Run with default credentials:

services:
  db:
    image: postgres:16
    environment:
      POSTGRES_USER: app
      POSTGRES_PASSWORD: secret
      POSTGRES_DB: mydb
    volumes:
      - pgdata:/var/lib/postgresql/data

  pgadmin:
    image: dpage/pgadmin4
    environment:
      PGADMIN_DEFAULT_EMAIL: admin@example.com
      PGADMIN_DEFAULT_PASSWORD: admin
    ports:
      - "5050:80"
    depends_on:
      - db

volumes:
  pgdata:

Pre-configure a server connection (servers.json):

{
  "Servers": {
    "1": {
      "Name": "Local Postgres",
      "Group": "Servers",
      "Host": "db",
      "Port": 5432,
      "MaintenanceDB": "mydb",
      "Username": "app",
      "SSLMode": "prefer"
    }
  }
}

docker run -d \
  -e PGADMIN_DEFAULT_EMAIL=admin@example.com \
  -e PGADMIN_DEFAULT_PASSWORD=admin \
  -v $(pwd)/servers.json:/pgadmin4/servers.json:ro \
  -p 5050:80 \
  dpage/pgadmin4

Image variants

dpage/pgadmin4:latest

The most recent stable pgAdmin 4 release. Based on a minimal Python image. Recommended for development and staging use.

dpage/pgadmin4:<version>

Pinned version tags such as dpage/pgadmin4:8.4. Use in production-like environments where you need to control upgrade timing and test compatibility with your PostgreSQL version.

Interested in base images that start and stay clean?