Skip to content

postgres

docker-compose.yml

services:
  postgresql:
    image: registry.cn-shanghai.aliyuncs.com/iproute/postgres-ext:15
    container_name: postgres15
    network_mode: host
    restart: always
    volumes:
      - ./data:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - TZ=Asia/Shanghai

Supported tags:

15 16 17 18

Included Packages

Each PostgreSQL major tag includes:

Package Purpose
postgresql-<major>-postgis-3 Spatial data support with PostGIS.
postgresql-<major>-pgrouting Routing and graph algorithms for PostGIS data.
postgresql-<major>-pg-stat-kcache Kernel-level CPU and I/O statistics for queries.
postgresql-<major>-pgvector Vector type and similarity search support.
postgresql-contrib-<major> PostgreSQL contrib extensions such as pg_trgm, uuid-ossp, and pg_stat_statements.
osm2pgrouting Import OpenStreetMap data into pgRouting-ready tables.
timescaledb-2-postgresql-<major> TimescaleDB time-series extension, enabled by default at build time.

The image also includes basic operational tools: ca-certificates, curl, wget, gnupg, lsb-release, and vim.

optimize

pgtune