PostgreSQL wrapped with the Knot entrypoint for agent integration, syslog logging and startup hooks.
1.6K
A PostgreSQL image for knot spaces. It wraps the official postgres image with the knot entrypoint, so a PostgreSQL instance running inside a space gets the same agent integration, rsyslog logging and startup hooks as every other knot base image. It is otherwise a standard PostgreSQL container and accepts the usual PostgreSQL environment variables.
All tags are multi-arch (linux/amd64, linux/arm64); see Docker Hub for the current list.
Each release is also tagged <version>-<BUILD_DATE>.
docker run -d \
-p 5432:5432 \
-e POSTGRES_PASSWORD=changeme \
-e KNOT_SERVER=https://knot.example.com \
-v pg_data:/var/lib/postgresql/data \
paularlott/knot-postgres:18
In a knot space, the password is typically set from the user's Service Password:
environment:
- KNOT_SERVER=${{.server.url}}
- KNOT_USER=postgres
- POSTGRES_PASSWORD=${{.user.service_password}}
Connect to the running server (from the host or another space) via knot port forwarding:
knot forward port 127.0.0.1:5432 <space> 5432
The image layers the knot entrypoint on top of the official PostgreSQL image. On startup the entrypoint:
KNOT_USER to postgres.KNOT_SERVER is set, downloads and starts the knot agent (as postgres).rsyslog and forwards logs to the agent's syslog port./etc/knot-startup.d/ and ~/.knot-startup.d/.execs PostgreSQL's original docker-entrypoint.sh with postgres.postgres user's home is relocated from /var/lib/postgresql (the data directory) to /home/postgres, so the knot agent's state and user startup hooks live under /home/postgres/.knot and ~/.knot-startup.d/ instead of colliding with database files.rsyslog (tag postgres).| Variable | Default | Description |
|---|---|---|
KNOT_USER | postgres | Runtime user (forced) |
KNOT_SERVER | (unset) | knot server URL; if set, the agent is started |
KNOT_AGENT_ENDPOINT | (unset) | Agent endpoint reported to the server |
KNOT_SPACEID | (unset) | Space identifier |
KNOT_SYSLOG_PORT | 1514 | Syslog forward target (0 disables forwarding) |
TZ | Etc/UTC | Timezone |
Plus all standard PostgreSQL variables (POSTGRES_PASSWORD, POSTGRES_USER, POSTGRES_DB, POSTGRES_INITDB_ARGS, …) and config mounted under $PGDATA (default /var/lib/postgresql/data).
| Port | Protocol | Purpose |
|---|---|---|
5432 | TCP | PostgreSQL |
/var/lib/postgresql/data — the PostgreSQL data directory (PGDATA); persist this across restarts.PostgreSQL is PostgreSQL License (similar to BSD/MIT). This image's packaging — the Dockerfile, knot-entrypoint and supporting scripts/configs — is Apache License 2.0.
Source: paularlott/knot-base-images.
Content type
Image
Digest
sha256:662064dd8…
Size
184.9 MB
Last updated
about 13 hours ago
docker pull paularlott/knot-postgres:18-20260929