How to build and publish the constructiveio/postgres-plus image to Docker Hub.
- Logged in to Docker Hub:
docker login - Push access to the
constructiveioorg on Docker Hub - Docker Desktop or a Docker engine with
buildxavailable (included in modern Docker installs)
Docker Hub serves a single image tag that resolves to the correct architecture for the puller (Intel/AMD servers get linux/amd64, Apple Silicon and Graviton get linux/arm64). To produce that, build with buildx and push a multi-arch manifest.
Create a buildx builder that supports multiple platforms:
docker buildx create --name multiarch --use --bootstrapConfirm both platforms are available:
docker buildx inspect multiarch
# Look for: Platforms: linux/amd64, linux/arm64, ...If linux/arm64 is missing on a non-ARM host, Docker Desktop's QEMU emulation handles it automatically. On a Linux host without Docker Desktop, install qemu-user-static first.
Multi-arch manifests can only be pushed — they cannot be --loaded into the local Docker daemon, because the daemon stores one architecture per tag.
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t constructiveio/postgres-plus:latest \
-t constructiveio/postgres-plus:18 \
--push .Tag with both :latest and the Postgres major version so users can pin if they want.
To smoke-test before pushing, build one arch at a time with --load:
docker buildx build --platform linux/arm64 \
-t constructiveio/postgres-plus:test --load .
docker run --rm -e POSTGRES_PASSWORD=test -p 5432:5432 \
constructiveio/postgres-plus:testA convenience target you can drop into the Makefile:
PLATFORMS ?= linux/amd64,linux/arm64
buildx-setup:
docker buildx inspect multiarch >/dev/null 2>&1 || \
docker buildx create --name multiarch --bootstrap
buildx: buildx-setup
docker buildx build --platform $(PLATFORMS) \
-t $(IMAGE_NAME):$(IMAGE_TAG) --push .Then: make buildx (optionally make buildx IMAGE_TAG=18).
After pushing, confirm both architectures landed:
docker buildx imagetools inspect constructiveio/postgres-plus:latestYou should see entries for both linux/amd64 and linux/arm64.
The README shown on the Docker Hub repo page (hub.docker.com/r/constructiveio/postgres-plus) is not synced automatically from this repo's README.md. You have to push it explicitly.
- Sign in at https://hub.docker.com
- Go to
constructiveio/postgres-plus - Click Manage Repository → edit the Overview field
- Paste the contents of
README.mdand save
Simple, but easy to forget when the README changes.
docker-pushrm is a Docker CLI plugin that pushes the README.
Install (macOS):
mkdir -p ~/.docker/cli-plugins
curl -sSL \
https://github.com/christian-korneck/docker-pushrm/releases/download/v1.9.0/docker-pushrm_darwin_arm64 \
-o ~/.docker/cli-plugins/docker-pushrm
chmod +x ~/.docker/cli-plugins/docker-pushrm(Swap darwin_arm64 for darwin_amd64 or linux_amd64 as needed; check the releases page for the latest version.)
Push the README:
docker pushrm constructiveio/postgres-plusIt reads README.md from the current directory by default. Add to the Makefile:
pushrm:
docker pushrm $(IMAGE_NAME)Wire it into CI so the Docker Hub page never drifts from the repo README. Add .github/workflows/dockerhub-description.yml:
name: Update Docker Hub description
on:
push:
branches: [main]
paths:
- README.md
- .github/workflows/dockerhub-description.yml
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: constructiveio/postgres-plus
short-description: "Lean PostgreSQL 18 with pgvector, PostGIS, pg_textsearch, pg_cron, pg_partman"
readme-filepath: ./README.mdDOCKERHUB_TOKEN should be a Docker Hub access token (Account Settings → Security) with Read, Write, Delete scope on this repo, stored as a repo secret. The default GITHUB_TOKEN won't work for Docker Hub.
For a typical version bump:
# 1. Test locally
make test
# 2. Build + push multi-arch image
make buildx IMAGE_TAG=latest
make buildx IMAGE_TAG=18
# 3. Update the Hub README (if it changed)
docker pushrm constructiveio/postgres-plus
# or just push to main and let the GitHub Action handle it
# 4. Verify
docker buildx imagetools inspect constructiveio/postgres-plus:latest