diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 208515f..9758cc3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,4 +1,4 @@ -name: Build and Push Docker Image +name: Build and Push Docker Images on: push: @@ -9,14 +9,14 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: constructive-io/docker/postgres-plus PG_VERSION: '17' concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-docker-postgres-plus + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: + # Build postgres-plus (Alpine, lean image without pg_lake) build-postgres-plus: strategy: fail-fast: false @@ -53,7 +53,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + images: ${{ env.REGISTRY }}/constructive-io/docker/postgres-plus tags: | type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=raw,value=${{ env.PG_VERSION }},enable=${{ github.ref == 'refs/heads/main' }} @@ -61,20 +61,20 @@ jobs: type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') }} type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') }} - - name: Build (no push, PR only, amd64) - if: github.event_name == 'pull_request' && matrix.platform == 'linux/amd64' + - name: Build (PR only) + if: github.event_name == 'pull_request' uses: docker/build-push-action@v6 with: context: . file: ./Dockerfile - platforms: linux/amd64 + platforms: ${{ matrix.platform }} push: false tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | PG_VERSION=${{ env.PG_VERSION }} - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=gha,scope=postgres-plus-${{ matrix.arch }} + cache-to: type=gha,mode=max,scope=postgres-plus-${{ matrix.arch }} - name: Build & push by digest if: github.event_name != 'pull_request' @@ -85,26 +85,116 @@ jobs: file: ./Dockerfile platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} - outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,push=true + outputs: type=image,name=${{ env.REGISTRY }}/constructive-io/docker/postgres-plus,push-by-digest=true,push=true build-args: | PG_VERSION=${{ env.PG_VERSION }} - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=gha,scope=postgres-plus-${{ matrix.arch }} + cache-to: type=gha,mode=max,scope=postgres-plus-${{ matrix.arch }} + + - name: Export digest + if: github.event_name != 'pull_request' + run: | + mkdir -p "${{ runner.temp }}/digests-postgres-plus" + digest="${{ steps.build.outputs.digest }}" + touch "${{ runner.temp }}/digests-postgres-plus/${digest#sha256:}" + + - name: Upload digest + if: github.event_name != 'pull_request' + uses: actions/upload-artifact@v4 + with: + name: digests-postgres-plus-${{ matrix.arch }} + path: ${{ runner.temp }}/digests-postgres-plus/* + + # Build postgres-plus-lake (Debian, includes pg_lake) + build-postgres-plus-lake: + strategy: + fail-fast: false + matrix: + include: + - platform: linux/amd64 + arch: amd64 + runner: ubuntu-latest + - platform: linux/arm64 + arch: arm64 + runner: ubuntu-24.04-arm + runs-on: ${{ matrix.runner }} + + permissions: + contents: read + packages: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Container Registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/constructive-io/docker/postgres-plus-lake + tags: | + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=${{ env.PG_VERSION }},enable=${{ github.ref == 'refs/heads/main' }} + type=sha,format=short,prefix= + type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') }} + type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') }} + + - name: Build (PR only) + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile.pg_lake + platforms: ${{ matrix.platform }} + push: false + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + # Note: pg_lake image uses Dockerfile default PG_VERSION (full version like 17.7) + # because it builds PostgreSQL from source and needs exact version number + cache-from: type=gha,scope=postgres-plus-lake-${{ matrix.arch }} + cache-to: type=gha,mode=max,scope=postgres-plus-lake-${{ matrix.arch }} + + - name: Build & push by digest + if: github.event_name != 'pull_request' + id: build + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile.pg_lake + platforms: ${{ matrix.platform }} + labels: ${{ steps.meta.outputs.labels }} + outputs: type=image,name=${{ env.REGISTRY }}/constructive-io/docker/postgres-plus-lake,push-by-digest=true,push=true + # Note: pg_lake image uses Dockerfile default PG_VERSION (full version like 17.7) + # because it builds PostgreSQL from source and needs exact version number + cache-from: type=gha,scope=postgres-plus-lake-${{ matrix.arch }} + cache-to: type=gha,mode=max,scope=postgres-plus-lake-${{ matrix.arch }} - name: Export digest if: github.event_name != 'pull_request' run: | - mkdir -p "${{ runner.temp }}/digests" + mkdir -p "${{ runner.temp }}/digests-postgres-plus-lake" digest="${{ steps.build.outputs.digest }}" - touch "${{ runner.temp }}/digests/${digest#sha256:}" + touch "${{ runner.temp }}/digests-postgres-plus-lake/${digest#sha256:}" - name: Upload digest if: github.event_name != 'pull_request' uses: actions/upload-artifact@v4 with: - name: digests-${{ matrix.arch }} - path: ${{ runner.temp }}/digests/* + name: digests-postgres-plus-lake-${{ matrix.arch }} + path: ${{ runner.temp }}/digests-postgres-plus-lake/* + # Publish postgres-plus manifest publish-postgres-plus-manifest: if: github.event_name != 'pull_request' runs-on: ubuntu-latest @@ -128,7 +218,79 @@ jobs: - name: Download digests uses: actions/download-artifact@v4 with: - pattern: digests-* + pattern: digests-postgres-plus-* + path: ${{ runner.temp }}/digests + merge-multiple: true + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/constructive-io/docker/postgres-plus + tags: | + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=${{ env.PG_VERSION }},enable=${{ github.ref == 'refs/heads/main' }} + type=sha,format=short,prefix= + type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') }} + type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') }} + + - name: Create and push multi-arch manifests + run: | + set -euo pipefail + + image="${{ env.REGISTRY }}/constructive-io/docker/postgres-plus" + digest_dir="${{ runner.temp }}/digests" + + if [ ! -d "$digest_dir" ]; then + echo "No digests directory found at $digest_dir" + exit 1 + fi + + digests="" + for digest_file in "$digest_dir"/*; do + digest="$(basename "$digest_file")" + digests="$digests $image@sha256:$digest" + done + + if [ -z "$digests" ]; then + echo "No digests found to create manifest" + exit 1 + fi + + echo "Creating manifests for tags:" + echo "${{ steps.meta.outputs.tags }}" + + echo "${{ steps.meta.outputs.tags }}" | while read -r tag; do + [ -z "$tag" ] && continue + echo "Creating multi-arch manifest for $tag" + docker buildx imagetools create -t "$tag" $digests + done + + # Publish postgres-plus-lake manifest + publish-postgres-plus-lake-manifest: + if: github.event_name != 'pull_request' + runs-on: ubuntu-latest + needs: build-postgres-plus-lake + + permissions: + contents: read + packages: write + + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Download digests + uses: actions/download-artifact@v4 + with: + pattern: digests-postgres-plus-lake-* path: ${{ runner.temp }}/digests merge-multiple: true @@ -136,7 +298,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + images: ${{ env.REGISTRY }}/constructive-io/docker/postgres-plus-lake tags: | type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=raw,value=${{ env.PG_VERSION }},enable=${{ github.ref == 'refs/heads/main' }} @@ -148,7 +310,7 @@ jobs: run: | set -euo pipefail - image="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}" + image="${{ env.REGISTRY }}/constructive-io/docker/postgres-plus-lake" digest_dir="${{ runner.temp }}/digests" if [ ! -d "$digest_dir" ]; then diff --git a/Dockerfile.pg_lake b/Dockerfile.pg_lake new file mode 100644 index 0000000..b2c6b5d --- /dev/null +++ b/Dockerfile.pg_lake @@ -0,0 +1,231 @@ +# PostgreSQL image with pgvector, PostGIS, pg_textsearch, pgsodium, and pg_lake +# Uses Debian base with PostgreSQL built from source (required for pg_lake internal headers) +# Multi-stage build - all toolchains discarded, only artifacts kept + +ARG PG_VERSION=17.7 +ARG PGVECTOR_VERSION=0.8.0 +ARG POSTGIS_VERSION=3.5.1 +ARG PG_TEXTSEARCH_VERSION=0.2.0 +ARG PGSODIUM_VERSION=3.1.9 +ARG PG_LAKE_VERSION=main + +############################################# +# Stage 1: Build PostgreSQL and extensions +############################################# +FROM debian:bookworm-slim AS builder + +ARG PG_VERSION +ARG PGVECTOR_VERSION +ARG POSTGIS_VERSION +ARG PG_TEXTSEARCH_VERSION +ARG PGSODIUM_VERSION +ARG PG_LAKE_VERSION + +# Install build dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + git \ + build-essential \ + curl \ + ca-certificates \ + wget \ + # PostgreSQL build dependencies + libreadline-dev \ + zlib1g-dev \ + libssl-dev \ + libxml2-dev \ + libxslt1-dev \ + libicu-dev \ + libossp-uuid-dev \ + liblz4-dev \ + flex \ + bison \ + pkg-config \ + # PostGIS dependencies + libgeos-dev \ + libproj-dev \ + libgdal-dev \ + libjson-c-dev \ + libprotobuf-c-dev \ + protobuf-c-compiler \ + libpcre2-dev \ + perl \ + # pgsodium dependencies + libsodium-dev \ + # pg_lake dependencies + cmake \ + ninja-build \ + libsnappy-dev \ + libjansson-dev \ + liblzma-dev \ + libzstd-dev \ + libkrb5-dev \ + libcurl4-openssl-dev \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /build + +# Build PostgreSQL from source (required for pg_lake internal headers) +ENV PGBASEDIR=/usr/local/pgsql +RUN wget https://ftp.postgresql.org/pub/source/v${PG_VERSION}/postgresql-${PG_VERSION}.tar.gz && \ + tar -xzf postgresql-${PG_VERSION}.tar.gz && \ + cd postgresql-${PG_VERSION} && \ + ./configure --prefix=${PGBASEDIR} \ + --with-openssl \ + --with-libxml \ + --with-libxslt \ + --with-icu \ + --with-uuid=ossp \ + --with-lz4 && \ + make -j$(nproc) && \ + make install && \ + cd contrib && make -j$(nproc) install && \ + cd ../.. && rm -rf postgresql-${PG_VERSION}* + +# Set PATH for pg_config +ENV PATH="${PGBASEDIR}/bin:${PATH}" + +# pgvector +RUN git clone --branch v${PGVECTOR_VERSION} --depth 1 https://github.com/pgvector/pgvector.git && \ + cd pgvector && \ + make OPTFLAGS="" -j$(nproc) && \ + make install && \ + cd .. && rm -rf pgvector + +# PostGIS (without raster and topology for smaller build) +RUN curl -L https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VERSION}.tar.gz | tar xz && \ + cd postgis-${POSTGIS_VERSION} && \ + ./configure --without-raster --without-topology --with-pgconfig=${PGBASEDIR}/bin/pg_config && \ + make && \ + make install && \ + cd .. && rm -rf postgis-${POSTGIS_VERSION} + +# pg_textsearch (BM25) +RUN git clone --branch v${PG_TEXTSEARCH_VERSION} --depth 1 https://github.com/timescale/pg_textsearch.git && \ + cd pg_textsearch && \ + sed -i '1i #include ' src/am/build.c && \ + make -j$(nproc) && \ + make install && \ + cd .. && rm -rf pg_textsearch + +# pgsodium +RUN git clone --branch v${PGSODIUM_VERSION} --depth 1 https://github.com/michelp/pgsodium.git && \ + cd pgsodium && \ + make -j$(nproc) && \ + make install && \ + cd .. && rm -rf pgsodium + +# pg_lake - Postgres with Iceberg and data lake access +RUN git clone --branch ${PG_LAKE_VERSION} --depth 1 --recurse-submodules https://github.com/Snowflake-Labs/pg_lake.git && \ + cd pg_lake && \ + # Build and install avro library + cd avro && git checkout -f . && git apply --ignore-whitespace ../avro.patch && \ + mkdir -p lang/c/build && cd lang/c/build && \ + cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=RelWithDebInfo && \ + make -j$(nproc) && make install && \ + cd /build/pg_lake && \ + # Build pg_lake extensions in dependency order + make -C pg_map && make -C pg_map install && \ + make -C pg_extension_base && make -C pg_extension_base install && \ + make -C pg_extension_updater && make -C pg_extension_updater install && \ + make -C pg_lake_engine && make -C pg_lake_engine install && \ + make -C pg_lake_copy && make -C pg_lake_copy install && \ + make -C pg_lake_iceberg && make -C pg_lake_iceberg install && \ + make -C pg_lake_table && make -C pg_lake_table install && \ + make -C pg_lake && make -C pg_lake install && \ + cd .. && rm -rf pg_lake + +############################################# +# Stage 2: Final runtime image +############################################# +FROM debian:bookworm-slim + +# Runtime deps only +RUN apt-get update && apt-get install -y --no-install-recommends \ + libreadline8 \ + zlib1g \ + libssl3 \ + libxml2 \ + libxslt1.1 \ + libicu72 \ + libossp-uuid16 \ + liblz4-1 \ + # PostGIS runtime + libgeos-c1v5 \ + libproj25 \ + libgdal32 \ + libjson-c5 \ + libprotobuf-c1 \ + libpcre2-8-0 \ + # pgsodium runtime + libsodium23 \ + # pg_lake runtime dependencies + libsnappy1v5 \ + libjansson4 \ + liblzma5 \ + libzstd1 \ + libkrb5-3 \ + libcurl4 \ + gosu \ + locales \ + && rm -rf /var/lib/apt/lists/* \ + && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 + +ENV LANG en_US.utf8 + +# Create postgres user +RUN groupadd -r postgres --gid=999 && \ + useradd -r -g postgres --uid=999 --home-dir=/var/lib/postgresql --shell=/bin/bash postgres && \ + mkdir -p /var/lib/postgresql && \ + chown -R postgres:postgres /var/lib/postgresql + +# Copy PostgreSQL installation from builder +COPY --from=builder /usr/local/pgsql /usr/local/pgsql + +# Copy avro library for pg_lake +COPY --from=builder /usr/local/lib/libavro* /usr/local/lib/ + +# Set up paths and environment +ENV PATH="/usr/local/pgsql/bin:${PATH}" +ENV PGDATA=/var/lib/postgresql/data +ENV LD_LIBRARY_PATH="/usr/local/lib" + +# Update library cache +RUN ldconfig + +# Create data directory +RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 1777 "$PGDATA" + +# Create run directory for socket +RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgresql && chmod 3777 /var/run/postgresql + +VOLUME /var/lib/postgresql/data + +EXPOSE 5432 + +# Simple entrypoint that initializes DB if needed and starts postgres +COPY --chmod=755 <<'EOF' /usr/local/bin/docker-entrypoint.sh +#!/bin/bash +set -e + +# If PGDATA is empty, initialize the database +if [ -z "$(ls -A "$PGDATA" 2>/dev/null)" ]; then + gosu postgres initdb --username=postgres --pwfile=<(echo "${POSTGRES_PASSWORD:-postgres}") + + # Allow connections from anywhere + echo "host all all 0.0.0.0/0 md5" >> "$PGDATA/pg_hba.conf" + echo "listen_addresses = '*'" >> "$PGDATA/postgresql.conf" +fi + +# If first arg is postgres or not provided, run postgres +if [ "$1" = 'postgres' ] || [ -z "$1" ]; then + exec gosu postgres postgres -D "$PGDATA" +fi + +exec "$@" +EOF + +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["postgres"] + +LABEL org.opencontainers.image.source="https://github.com/constructive-io/docker" +LABEL org.opencontainers.image.description="PostgreSQL 17 with pgvector, PostGIS, pg_textsearch, pgsodium, and pg_lake (Debian-based, built from source)" diff --git a/Makefile b/Makefile index 2d36ed8..2d68802 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,22 @@ -.PHONY: build run stop clean test shell push +.PHONY: build build-lake run run-lake stop clean test test-lake shell push push-lake IMAGE_NAME ?= constructive/postgres +IMAGE_NAME_LAKE ?= constructive/postgres-lake IMAGE_TAG ?= latest CONTAINER_NAME ?= constructive-pg POSTGRES_PASSWORD ?= postgres +# Build postgres-plus (Alpine, lean) build: docker build -t $(IMAGE_NAME):$(IMAGE_TAG) . +# Build postgres-plus-lake (Debian, with pg_lake) +build-lake: + docker build -t $(IMAGE_NAME_LAKE):$(IMAGE_TAG) -f Dockerfile.pg_lake . + +# Build both images +build-all: build build-lake + run: docker run -d \ --name $(CONTAINER_NAME) \ @@ -15,9 +24,18 @@ run: -p 5432:5432 \ $(IMAGE_NAME):$(IMAGE_TAG) +run-lake: + docker run -d \ + --name $(CONTAINER_NAME)-lake \ + -e POSTGRES_PASSWORD=$(POSTGRES_PASSWORD) \ + -p 5432:5432 \ + $(IMAGE_NAME_LAKE):$(IMAGE_TAG) + stop: docker stop $(CONTAINER_NAME) || true docker rm $(CONTAINER_NAME) || true + docker stop $(CONTAINER_NAME)-lake || true + docker rm $(CONTAINER_NAME)-lake || true restart: stop run @@ -27,6 +45,7 @@ shell: logs: docker logs -f $(CONTAINER_NAME) +# Test postgres-plus (Alpine) test: build @echo "Starting container..." @docker run -d --name $(CONTAINER_NAME)-test \ @@ -44,8 +63,34 @@ test: build @docker stop $(CONTAINER_NAME)-test > /dev/null @docker rm $(CONTAINER_NAME)-test > /dev/null +# Test postgres-plus-lake (Debian with pg_lake) +test-lake: build-lake + @echo "Starting container..." + @docker run -d --name $(CONTAINER_NAME)-lake-test \ + -e POSTGRES_PASSWORD=test \ + $(IMAGE_NAME_LAKE):$(IMAGE_TAG) > /dev/null + @echo "Waiting for postgres..." + @sleep 5 + @echo "Testing extensions..." + @docker exec $(CONTAINER_NAME)-lake-test psql -U postgres -c " \ + CREATE EXTENSION vector; \ + CREATE EXTENSION postgis; \ + CREATE EXTENSION pg_textsearch; \ + CREATE EXTENSION pgsodium; \ + CREATE EXTENSION pg_lake; \ + SELECT 'all extensions OK';" + @docker stop $(CONTAINER_NAME)-lake-test > /dev/null + @docker rm $(CONTAINER_NAME)-lake-test > /dev/null + +# Test both images +test-all: test test-lake + clean: stop docker rmi $(IMAGE_NAME):$(IMAGE_TAG) || true + docker rmi $(IMAGE_NAME_LAKE):$(IMAGE_TAG) || true push: docker push $(IMAGE_NAME):$(IMAGE_TAG) + +push-lake: + docker push $(IMAGE_NAME_LAKE):$(IMAGE_TAG) diff --git a/README.md b/README.md index 91dd59c..2bf73b8 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,19 @@ constructive

-Lean PostgreSQL 17 image with essential extensions for modern applications. +PostgreSQL 17 images with essential extensions for modern applications. -## Extensions +## Images + +This repository provides two Docker images: + +### postgres-plus (Alpine, lean) + +Lightweight image based on Alpine Linux with core extensions. + +```bash +docker pull ghcr.io/constructive-io/docker/postgres-plus:latest +``` | Extension | Description | |-----------|-------------| @@ -15,18 +25,38 @@ Lean PostgreSQL 17 image with essential extensions for modern applications. | [pg_textsearch](https://www.tigerdata.com/docs/use-timescale/latest/extensions/pg-textsearch) | BM25 full-text search | | [pgsodium](https://github.com/michelp/pgsodium) | Encryption using libsodium | +### postgres-plus-lake (Debian, with pg_lake) + +Full-featured image based on Debian with all extensions including pg_lake for data lake access. + +```bash +docker pull ghcr.io/constructive-io/docker/postgres-plus-lake:latest +``` + +| Extension | Description | +|-----------|-------------| +| [pgvector](https://github.com/pgvector/pgvector) | Vector similarity search for embeddings | +| [PostGIS](https://postgis.net/) | Spatial and geographic data | +| [pg_textsearch](https://www.tigerdata.com/docs/use-timescale/latest/extensions/pg-textsearch) | BM25 full-text search | +| [pgsodium](https://github.com/michelp/pgsodium) | Encryption using libsodium | +| [pg_lake](https://github.com/Snowflake-Labs/pg_lake) | Iceberg and data lake access | + ## Usage ```bash -# Pull the image -docker pull ghcr.io/constructive-io/docker:latest +# Run postgres-plus (Alpine) +docker run -d \ + --name postgres \ + -e POSTGRES_PASSWORD=secret \ + -p 5432:5432 \ + ghcr.io/constructive-io/docker/postgres-plus:latest -# Run +# Run postgres-plus-lake (Debian with pg_lake) docker run -d \ --name postgres \ -e POSTGRES_PASSWORD=secret \ -p 5432:5432 \ - ghcr.io/constructive-io/docker:latest + ghcr.io/constructive-io/docker/postgres-plus-lake:latest ``` Enable extensions as needed: @@ -36,15 +66,28 @@ CREATE EXTENSION vector; CREATE EXTENSION postgis; CREATE EXTENSION pg_textsearch; CREATE EXTENSION pgsodium; +CREATE EXTENSION pg_lake; -- only available in postgres-plus-lake ``` ## Build ```bash -make build # Build image -make test # Build and verify extensions -make run # Run container -make shell # psql into container -make clean # Remove image +# postgres-plus (Alpine) +make build # Build image +make test # Build and verify extensions +make run # Run container + +# postgres-plus-lake (Debian with pg_lake) +make build-lake # Build image +make test-lake # Build and verify extensions +make run-lake # Run container + +# Both images +make build-all # Build both images +make test-all # Test both images + +# Common +make shell # psql into container +make clean # Remove images ```