Sign inSign up

dawsonlp/postgres-batteries-inc

By dawsonlp

•Updated about 2 months ago

PostgreSQL 18 with PostGIS, pgvector, Apache AGE, pgRouting & 20+ extensions. Multi-arch.

Image
Databases & storage
0

5.1K

dawsonlp/postgres-batteries-inc repository overview

⁠PostgreSQL Batteries-Included

PostgreSQL 18 with PostGIS, pgvector, Apache AGE, pgRouting, and 20+ essential extensions pre-installed. Multi-architecture (amd64 + arm64).

⁠Quick Start

docker run -d \
  --name postgres \
  -e POSTGRES_PASSWORD=mysecretpassword \
  -e POSTGRES_DB=mydb \
  -p 5432:5432 \
  dawsonlp/postgres-batteries-inc:latest

⁠Included Extensions

CategoryExtensions
SpatialPostGIS 3.6, PostGIS Topology, PostGIS Raster, TIGER Geocoder, pgRouting 4.0
Vector/AIpgvector 0.8 (vector similarity search, ANN indexes)
GraphApache AGE 1.7 (graph database, openCypher queries)
Full-Text Searchpg_trgm, fuzzystrmatch, unaccent
Utilitiesuuid-ossp, pgcrypto, hstore, citext, ltree
Analyticstablefunc (crosstab/pivot), intarray
Indexingbtree_gin, btree_gist
Monitoringpg_stat_statements

⁠Key Features

  • 21 extensions pre-installed and auto-configured on first startup
  • Apache AGE with shared_preload_libraries pre-configured — Cypher queries work out of the box
  • Search path includes ag_catalog, public, tiger, tiger_data by default
  • Sample tables created automatically: vector embeddings, spatial locations, full-text search documents, routing network, graph
  • TIGER Geocoder ready for Census data loading (US address geocoding)
  • Multi-arch: linux/amd64 and linux/arm64
  • Health check built in

⁠Usage Examples

-- Vector similarity search
SELECT * FROM sample_vectors ORDER BY embedding <=> query_vector LIMIT 10;

-- Spatial query (find within 1km)
SELECT * FROM sample_locations
WHERE ST_DWithin(point, ST_MakePoint(-122.42, 37.77)::geography, 1000);

-- Graph query (Cypher)
SELECT * FROM cypher('sample_graph', $$
  CREATE (a:Person {name: 'Alice'})-[:KNOWS]->(b:Person {name: 'Bob'})
  RETURN a, b
$$) AS (a agtype, b agtype);

-- Full-text search
SELECT * FROM sample_documents
WHERE search_vector @@ plainto_tsquery('english', 'search terms');

-- Shortest path routing
SELECT * FROM pgr_dijkstra(
  'SELECT id, source, target, cost FROM sample_roads',
  start_id, end_id
);

⁠Environment Variables

VariableDefaultDescription
POSTGRES_PASSWORD(required)Database superuser password
POSTGRES_USERpostgresDatabase superuser name
POSTGRES_DBpostgresDefault database name

⁠Tags

  • latest, 18 — PostgreSQL 18 with all extensions

⁠Source

GitHub: dawsonlp/docker_images⁠

Tag summary

Content type

Image

Digest

sha256:b1bb9fde7…

Size

283.6 MB

Last updated

about 2 months ago

docker pull dawsonlp/postgres-batteries-inc