Skip to content

Conversation

kevinmichaelchen
Copy link

@kevinmichaelchen kevinmichaelchen commented Oct 14, 2025

This update modernizes the clkao image repository to support newer PostgreSQL versions and adds several important features.

Motivation

Note

The crux of why I made this was:

  • "JSONB columns are cool, but I want some safety … like with JSON Schema!" 💡
  • "A PG extension (pg_jsonschema) exists for this, but it's not supported on AWS RDS." 😩
  • "But AWS RDS does support TLE! Let me use JS to write some PG functions!" 🙌
  • "Uh-oh, no Docker images exist that provide PL/V8 (JS) and TLE." 😩

Users of Postgres' JSON and JSONB columns might be wanting JSON Schema support. The most well-known extension that offers JSON Schema is the one from Supabase (see their post and source). Unfortunately, such extensions are not universally supported. For example, AWS RDS does not support pg_jsonschema. However, they do support Trusted Language Extensions (TLE), which can be written in PL/V8, which allows you to write functions in Javascript that are available in SQL. The purpose behind this PR is to provide basic Docker images that provide both PL/V8 and TLE out of the box. No such images exist. Such images will make it trivial to test any JS-written functions you plan on writing and shipping.

New Features

  • PostgreSQL 13-16 support: Added Dockerfiles for PostgreSQL 13, 14, 15,
    and 16 with plv8 3.2.4 (directories: 13-3, 14-3, 15-3, 16-3)

  • pg_tle integration: Created variants with pg_tle (Trusted Language Extensions) pre-installed and configured for PostgreSQL 12-16 (directories: 12-2-tle through 16-3-tle)

  • Multi-architecture support: Added support for building AMD64 and ARM64 (Apple Silicon) images via Docker Buildx

    • build-multiarch.sh script for local multi-arch builds
    • GitHub Actions workflow for automated CI/CD builds

Fixes

  • Resolved Debian Buster archive issues: New images use official postgres:XX base images which provide modern Debian (Bookworm), eliminating 404 errors from archived Debian Buster repositories

Documentation

  • Updated README with new PostgreSQL versions and plv8 3.x support
  • Added pg_tle usage documentation
  • Added multi-architecture build instructions
  • Reorganized tags by version category for better clarity

Resolves issues with outdated PostgreSQL versions, archived Debian base, and lack of ARM64 support.

…ilds

This update modernizes the image repository to support newer PostgreSQL
versions and adds several important features:

## New Features

- **PostgreSQL 13-16 support**: Added Dockerfiles for PostgreSQL 13, 14, 15,
  and 16 with plv8 3.2.4 (directories: 13-3, 14-3, 15-3, 16-3)

- **pg_tle integration**: Created variants with pg_tle (Trusted Language
  Extensions) pre-installed and configured for PostgreSQL 12-16
  (directories: 12-2-tle through 16-3-tle)

- **Multi-architecture support**: Added support for building AMD64 and ARM64
  (Apple Silicon) images via Docker Buildx
  - build-multiarch.sh script for local multi-arch builds
  - GitHub Actions workflow for automated CI/CD builds

## Fixes

- **Resolved Debian Buster archive issues**: New images use official postgres:XX
  base images which provide modern Debian (Bookworm), eliminating 404 errors
  from archived Debian Buster repositories

## Documentation

- Updated README with new PostgreSQL versions and plv8 3.x support
- Added pg_tle usage documentation
- Added multi-architecture build instructions
- Reorganized tags by version category for better clarity

Resolves issues with outdated PostgreSQL versions, archived Debian base,
and lack of ARM64 support.
Updates older PostgreSQL versions to use the latest plv8 version (3.2.4)
for consistency across all images and to resolve known bugs.

## Changes

- **PostgreSQL 12**: Updated from plv8 2.3.13 to 3.2.4
- **PostgreSQL 11**: Updated from plv8 2.3.13 to 3.2.4
- **PostgreSQL 10**: Updated from plv8 2.3.13 to 3.2.4
- **PostgreSQL 9.6**: Updated from plv8 v2.1.0 to 3.2.4

## Dependency Updates

- Updated `python` to `python3` for all versions
- Added `libc++abi-dev` to build dependencies where missing
- Added `libc++abi1` and `libtinfo5` to runtime dependencies
- Standardized build process across all versions

## Bug Fixes

Resolves GitHub issue clkao#36 - plv8 2.3.13 bug is fixed in newer versions.
The update to 3.2.4 includes all bug fixes from 2.3.14 onwards.
Implements a release workflow that automatically creates granular Docker Hub
tags from Git tags, enabling users to pin specific plv8 versions.

## Features

- **Automated versioned tags**: Git tag `v3.2.4` creates:
  - Full version: `16-3.2.4`, `15-3.2.4`, etc.
  - Minor version: `16-3.2`, `15-3.2`, etc.
  - Major version: `16-3`, `15-3`, etc.

- **Supports all PostgreSQL versions**: 9.6 through 16
- **Includes pg_tle variants**: Separate tags with `-tle` suffix
- **Multi-architecture**: Builds for both AMD64 and ARM64
- **Manual trigger option**: Can manually trigger via workflow_dispatch

## Workflow

The release.yml workflow triggers on:
1. Push of version tags (e.g., `v3.2.4`)
2. Manual workflow dispatch with version input

This provides immutable, versioned tags for reproducible builds while
maintaining mutable convenience tags (latest, 16-3).

## Documentation

Updated README with:
- Tag format explanation and examples
- Release creation instructions
- Automated build tag generation details

Resolves GitHub issue clkao#12.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant