Sign inSign up

lcdss/postgres-ulid

By lcdss

•Updated about 24 hours ago

PostgreSQL images with the pgx_ulid extension preinstalled

Image
Databases & storage
0

10K+

lcdss/postgres-ulid repository overview

⁠postgres-ulid

Docker Pulls Image Size Daily Sync

lcdss/postgres-ulid is the official PostgreSQL Docker image with the pgx_ulid⁠ extension already built in, so you get a native ulid column type and gen_ulid() without compiling anything.

Every tag here is the same build as lcdss/postgres:<tag>-ulid, published from the same pipeline on the same schedule. It carries pgx_ulid and nothing else, and it keeps being published — you do not have to move.

Other extensions, such as pgvector, live on lcdss/postgres⁠:

-image: lcdss/postgres-ulid:18-alpine
+image: lcdss/postgres:18-alpine-ulid   # same contents as this repository
+image: lcdss/postgres:18-alpine        # pgx_ulid + pgvector

⁠What Changed

  • pgx_ulid is no longer created for you. Older images ran CREATE EXTENSION pgx_ulid on a fresh data directory; these do not. Run it yourself in each database, or start the container with POSTGRES_ENABLE_EXTENSIONS=pgx_ulid to keep the old behavior. Existing data directories are unaffected — the extension is already there.
  • The image labels moved from io.github.lcdss.postgres-ulid.* to io.github.lcdss.postgres.*, and the entrypoint init script inside the image is now 10-enable-extensions.sh.

⁠Supported Platforms

linux/amd64 only. Upstream postgres publishes more architectures, but these images do not, so on Apple Silicon and other arm64 hosts Docker falls back to emulation.

⁠Quick Start

docker run -d \
  --name postgres-ulid \
  -e POSTGRES_PASSWORD=postgres \
  -p 5432:5432 \
  lcdss/postgres-ulid:18-alpine
docker exec -it postgres-ulid psql -U postgres
CREATE EXTENSION pgx_ulid;

CREATE TABLE users (
  id ulid PRIMARY KEY DEFAULT gen_ulid(),
  email text NOT NULL UNIQUE,
  created_at timestamptz NOT NULL DEFAULT now()
);

INSERT INTO users (email) VALUES ('[email protected]') RETURNING id;

⁠Monotonic ULIDs

gen_monotonic_ulid() needs the library preloaded, which the image does not do by default:

docker run -d \
  --name postgres-ulid-monotonic \
  -e POSTGRES_PASSWORD=postgres \
  lcdss/postgres-ulid:18-alpine \
  postgres -c shared_preload_libraries=pgx_ulid

In compose, pass the same override as command:.

⁠Tags

Tags mirror the official postgres image: exact major tags from 14 and newer, in the alpine and trixie families, plus the floating alpine and trixie tags that move with the newest major. A scheduled job rebuilds a tag when the upstream digest or the build inputs change.

Full documentation, including the label reference and the other extensions, lives on lcdss/postgres⁠.

⁠License

This repository's own files are MIT licensed, see LICENSE⁠. The images also carry everything upstream ships: PostgreSQL under the PostgreSQL License⁠, the base image contents under their respective licenses, and pgx_ulid under its own terms⁠.

⁠Disclaimer

Unofficial image, not affiliated with Docker, Inc., the PostgreSQL Global Development Group, or the pgx_ulid maintainers.

Tag summary

Content type

Image

Digest

sha256:b7014943d…

Size

111 MB

Last updated

about 24 hours ago

docker pull lcdss/postgres-ulid:16-alpine