# docker-images **Repository Path**: ymjake/docker-images ## Basic Information - **Project Name**: docker-images - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-13 - **Last Updated**: 2026-04-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PostgreSQL AI Extensions Image This directory contains a focused PostgreSQL 18 image for AI and RAG scenarios. ## Included extensions - `vector` - `age` - `pg_textsearch` - `pg_trgm` - `unaccent` ## Why this image exists - Keep the database image focused on the extensions used by the knowledge-base POC. - Avoid carrying unrelated spatial, routing, analytics, and TIGER geocoder dependencies. - Make hybrid retrieval and graph experimentation reproducible across projects. ## Files - `Dockerfile`: builds PostgreSQL 18 with the five required extensions - `docker-compose.yml`: local run configuration - `init-scripts/01-init-extensions-ai.sql`: initializes the extensions on first startup ## Build ```powershell docker build -t local/postgres-ai:18 . ``` ## Run ```powershell docker compose up -d --build ``` ## Verify ```sql SELECT * FROM pg_available_extensions WHERE name IN ('vector', 'age', 'pg_textsearch', 'pg_trgm', 'unaccent'); SELECT extname, extversion FROM pg_extension ORDER BY extname; ``` ## Smoke test ```sql SELECT '[1,2,3]'::vector; LOAD 'age'; SET search_path = ag_catalog, "$user", public; SELECT create_graph('smoke_graph'); CREATE TABLE docs ( id bigserial PRIMARY KEY, content text NOT NULL ); INSERT INTO docs (content) VALUES ('warehouse allocation rule'), ('delayed shipment support'); CREATE INDEX docs_bm25_idx ON docs USING bm25(content) WITH (text_config = 'english'); SELECT * FROM docs ORDER BY content <@> 'allocation rule' LIMIT 5; ``` ## Notes - `pgvector` is installed from the PostgreSQL 18 package. - `Apache AGE` is compiled from source for PostgreSQL 18. - `pg_textsearch` is compiled from source and preloaded at startup. - If you upgrade PostgreSQL major versions, re-check the Apache AGE tag and `pg_textsearch` compatibility first.