Bitnami PostgreSQL 16 with pgvector 0.8.1, non-root and OpenShift-compatible
27
Bitnami PostgreSQL 16 with the pgvector extension (v0.8.1) compiled in. It runs as a non-root user and works on OpenShift's default restricted-v2 SCC, which assigns an arbitrary UID with GID 0.
Unofficial build. This repository is not affiliated with or endorsed by Bitnami, Broadcom or the pgvector project.
bitnamilegacy/postgresql:16.3.0-debian-12-r14v0.8.1, built from source and installed into /opt/bitnami/postgresql/opt/bitnami/postgresql, so a random UID can read and run it1001, as in the Bitnami imageIt replaces the usual workaround of compiling pgvector at pod start in a root init container, which a restricted SCC rejects.
Maintenance note. The base image comes from the
bitnamilegacyrepository, which holds older Bitnami images that are no longer updated. Plan for security updates yourself.
| Tag | PostgreSQL | pgvector |
|---|---|---|
16.3.0-pgvector-0.8.1 | 16.3.0 | 0.8.1 |
The image uses the standard Bitnami PostgreSQL variables:
| Variable | Description |
|---|---|
POSTGRESQL_USERNAME | Application user to create |
POSTGRESQL_PASSWORD | Password of that user |
POSTGRESQL_DATABASE | Database to create |
POSTGRESQL_POSTGRES_PASSWORD | Password of the postgres admin user |
POSTGRESQL_SHARED_PRELOAD_LIBRARIES | Optional, for example pgaudit |
The server listens on port 5432 and stores data under /bitnami/postgresql. As with every Bitnami PostgreSQL image, users and passwords are only applied when a new, empty data directory is initialised. An existing volume keeps the roles it already has.
docker run --rm -p 5432:5432 \
-e POSTGRESQL_USERNAME=statgpt \
-e POSTGRESQL_PASSWORD=<password> \
-e POSTGRESQL_DATABASE=statgpt \
-e POSTGRESQL_POSTGRES_PASSWORD=<admin-password> \
-v pgdata:/bitnami/postgresql \
fireport/postgresql-pgvector:16.3.0-pgvector-0.8.1
Enable the extension in each database that needs it:
CREATE EXTENSION IF NOT EXISTS vector;
pgvector:
image:
registry: docker.io
repository: fireport/postgresql-pgvector
tag: 16.3.0-pgvector-0.8.1
primary:
podSecurityContext:
enabled: false
containerSecurityContext:
enabled: false
Disabling the security contexts lets OpenShift assign the UID and GID. If the chart validates images, you may also need global.security.allowInsecureImages: true.
docker run --rm --user 1000970000:0 --entrypoint sh \
fireport/postgresql-pgvector:16.3.0-pgvector-0.8.1 \
-c 'ls -l /opt/bitnami/postgresql/lib/vector.so /opt/bitnami/postgresql/share/extension/vector.control'
docker build --platform linux/amd64 \
-f Dockerfile.postgresql-pgvector \
-t fireport/postgresql-pgvector:16.3.0-pgvector-0.8.1 .
PGVECTOR_VERSION is a build argument, v0.8.1 by default.
Content type
Image
Digest
sha256:71f0598a9…
Size
272.5 MB
Last updated
3 days ago
docker pull fireport/postgresql-pgvector:16.3.0-pgvector-0.8.1