Sign inSign up

supernpc/postgres

By supernpc

•Updated 12 days ago

Image
0

371

supernpc/postgres repository overview

⁠supernpc/postgres

A batteries-included PostgreSQL image for time-series, geospatial, vector/AI, and Chinese full-text search workloads — built on the official postgres:18.6 (Debian trixie) base, with a wide range of extensions pre-installed and enabled.

Optimized with a multi-stage build: all compile toolchains live only in the builder stage, so the final runtime image stays lean and free of gcc/make/cmake.

⁠Tags

TagDescription
18.6, latestPostgreSQL 18.6, multi-arch (linux/amd64, linux/arm64)

⁠Base image

  • postgres:18.6 — Debian trixie

⁠Pre-installed extensions

ExtensionVersion / SourceNotes
TimescaleDBtimescaledb-2-postgresql-18 (apt)Time-series; preloaded
PostGISpostgresql-18-postgis-3 (apt)Includes postgis_topology
pgRoutingpostgresql-18-pgrouting (apt)Geospatial routing
pg_cronpostgresql-18-cron (apt)Scheduled jobs; runs in postgres db by default
pg_partmanpostgresql-18-partman 5.5.0 (apt)Partition management; installed in partman schema
pg_stat_statementscontrib (base image)Query statistics; preloaded
plpython3upostgresql-plpython3-18 (apt)Untrusted Python 3 procedural language
pgvectorcompiled from sourceVector similarity search (vector)
pgmqcompiled from sourceMessage queue over PostgreSQL tables
zhparsercompiled (scws 1.2.3)Chinese full-text segmentation (zhparser)
pgmqtt0.5.1 (prebuilt)MQTT / logical-decoding CDC; preloaded
pg_searchParadeDB 0.26.1 (prebuilt)BM25 full-text search; preloaded; needs pgvector

⁠Preloaded shared libraries

The following are set in shared_preload_libraries:

timescaledb, pg_stat_statements, pg_cron, pgmqtt, pg_search

Other tuned settings (applied to postgresql.conf.sample):

SettingValue
wal_levellogical (required by pgmqtt CDC)
output_plugin_librariespgoutput, test_decoding, pgmqtt
timescaledb.telemetry_leveloff
cron.database_namepostgres
pgmqtt.databasepostgres

⁠Initialization

The init script (/docker-entrypoint-initdb.d/1.init-postgres.sh) automatically creates all extensions on first start:

  • timescaledb, postgis, postgis_topology, pg_stat_statements, plpython3u
  • vector, pgmq, pgmqtt, pg_search
  • pg_partman (in the partman schema)
  • pg_cron in the default postgres database

It also prints the PostgreSQL version and the enabled-extension list on boot.

pg_partman auto-maintenance is off by default. To enable, uncomment the cron.schedule('pg-partman-maintenance', ...) line in init-postgres.sh to drive partman.run_maintenance_proc() via pg_cron.

⁠Usage

Same as the official postgres image:

docker run -d \
  --name pg \
  -e POSTGRES_PASSWORD=mysecretpassword \
  -p 5432:5432 \
  -p 1883:1883 \
  supernpc/postgres:18.6

Persist data with a volume:

docker run -d \
  --name pg \
  -e POSTGRES_PASSWORD=mysecretpassword \
  -v pgdata:/var/lib/postgresql/data \
  -p 5432:5432 \
  -p 1883:1883 \
  supernpc/postgres:18.6

⁠Notes

  • Multi-arch: built with docker buildx for linux/amd64 and linux/arm64.
  • zhparser depends on the scws 1.2.3 runtime library (bundled, LD_LIBRARY_PATH=/opt/scws/lib).
  • pg_search (ParadeDB) is a Rust/pgrx extension that must be preloaded and requires pgvector already enabled — both are wired up out of the box.
  • pgmqtt uses logical decoding for CDC; wal_level=logical is already set.
  • MQTT port: pgmqtt embeds an MQTT broker/listener that binds 1883 by default. Publish/subscribe to it from outside the container by publishing -p 1883:1883 (shown in the usage examples above).

Tag summary

Content type

Image

Digest

sha256:18e6f213e…

Size

526.6 MB

Last updated

12 days ago

docker pull supernpc/postgres