PostgreSQL extensions
as stackable layers
The official PostgreSQL Docker images include only a handful of ready-to-use extensions. pglayers gives you pre-built extensions that stack on top of the official images. No compilers, no dependencies, no waiting.
Includes DocumentDB for MongoDB wire protocol compatibility, pgvector + pgvectorscale for AI embeddings, pg_lake for Iceberg/data lake access, and much more.
# Ready-to-use: all 50+ extensions included docker run -d -e POSTGRES_PASSWORD=secret \ ghcr.io/pglayers/pglayers-full:17 # Match the open-source extensions available in Azure Database for PostgreSQL docker run -d -e POSTGRES_PASSWORD=secret \ ghcr.io/pglayers/pglayers-azure:17 # Or pick your own extensions FROM postgres:17 COPY --from=ghcr.io/pglayers/pgx-pgvector:17 / / COPY --from=ghcr.io/pglayers/pgx-pg_cron:17 / / COPY --from=ghcr.io/pglayers/pgx-postgis:17 / /
Extensions without the pain
Stop wrestling with build dependencies. Each extension is a minimal Docker image layer you stack on top of the official PostgreSQL image.
Composable Layers
Each extension is a self-contained Docker layer. Add one line per extension to your Dockerfile. They compose cleanly with no conflicts.
Official Base Images
Built on top of the official postgres Docker images. Same security patches, same update cadence, same trust chain.
Instant Builds
No compilation, no waiting. Docker pulls pre-built layers from the registry and overlays them in seconds.
Tested & Verified
Every extension is tested for file collisions, missing shared libraries, and runtime functionality across all PG versions.
Multi-Architecture
All images support linux/amd64 and linux/arm64. Docker automatically pulls the right architecture for your platform.
Permissive Licenses
Only extensions with permissive open-source licenses. No proprietary dependencies, no surprise restrictions.
Profile images
Pre-configured PostgreSQL images with curated extension sets. Run one command and get a fully-loaded database.
Azure
Extensions matching Azure Database for PostgreSQL Flexible Server. Includes DocumentDB for MongoDB wire protocol compatibility (same engine as Azure DocumentDB).
docker run -d -e POSTGRES_PASSWORD=s ghcr.io/pglayers/pglayers-azure:17
Full
Every extension pglayers provides. The complete toolkit for development, testing, and experimentation.
docker run -d -e POSTGRES_PASSWORD=s ghcr.io/pglayers/pglayers-full:17
Runtime extensions via ImageVolumes
PostgreSQL 18 introduced extension_control_path -- and pglayers takes full advantage. Mount extensions at deploy time with zero image rebuilds.
Kubernetes ImageVolumes
Each extension image mounts as a read-only volume at /extensions/<name>/. Add or remove extensions by changing Pod volumes -- no image rebuild needed.
CloudNativePG Compatible
Images use the CNPG-standard layout (/lib/ + /share/extension/). Generate a ClusterImageCatalog with one command and let the operator handle the rest.
OCI Labels for Discovery
Every image includes standard OCI labels (name, version, license, PG version) for machine-readable discovery via registry APIs or docker inspect.
Zero Collision Risk
Each extension lives in its own namespace. Two extensions can bundle different versions of the same library without conflict -- collisions are structurally impossible.
# Stock postgres:18 + extensions as Kubernetes ImageVolumes # No custom image build required apiVersion: v1 kind: Pod spec: volumes: - name: ext-pgvector image: reference: ghcr.io/pglayers/pgx-pgvector:18-0.8.4 - name: ext-postgis image: reference: ghcr.io/pglayers/pgx-postgis:18-3.6.4 containers: - image: postgres:18 args: ["postgres", "-c", "extension_control_path=...$$system"] volumeMounts: - name: ext-pgvector mountPath: /extensions/pgvector - name: ext-postgis mountPath: /extensions/postgis
Requires PostgreSQL 18+ and Kubernetes 1.33+. Works with any orchestrator -- CNPG, plain Deployments, StatefulSets, or Helm charts.
Layer composition
pglayers publishes each extension as a minimal FROM scratch image containing only the compiled binaries at the correct filesystem paths.
Start from official image
Your Dockerfile starts with the official postgres image -- same as always.
Stack extension layers
Each COPY --from line pulls a pre-built extension layer and overlays it onto the image.
Run with extensions
The result is a single image with exactly the extensions you chose. CREATE EXTENSION and go.