Skip to content

Language runtimes & services

Runtime and service images are distroless: no shell, no package manager at runtime. Use exec-form RUN ["..."] in Dockerfiles and exec-form command in Kubernetes. Dockerfile examples: Quickstart.

Image Tags Base Contents Entrypoint
python-hardened 3.12 Wolfi Python 3.12, pip /usr/bin/python3
node-hardened 22 Wolfi Node.js 22, npm /usr/bin/node
golang-hardened 1.26, 1.27 Wolfi Go, build-base, git /usr/bin/go
java-openjdk 21 Wolfi OpenJDK 21 JRE /usr/bin/java

PIP_NO_CACHE_DIR=1 and PYTHONUNBUFFERED=1 are preset. Install dependencies with pip install --target into a directory owned by 65532, then set PYTHONPATH.

NODE_ENV=production is preset. There is no /usr/bin/env, so run npm as node /usr/lib/node_modules/npm/bin/npm-cli.js, and pass --ignore-scripts since lifecycle scripts need a shell.

A build image, not a runtime: it ships build-base and git. CGO_ENABLED=0 and GOPATH=/home/nonroot/go are preset. Copy the binary into wolfi-base.

JRE only. Build with your own JDK stage, copy the JAR, and run CMD ["-jar", "/app/app.jar"].

Image Tags Base Entrypoint Notes
postgres-hardened 16 Wolfi /usr/bin/postgres Includes postgresql-16-contrib
redis-hardened 7.2 Alpine /usr/bin/redis-server Working directory /var/lib/redis, writable by 65532
nginx-hardened 1.26 Wolfi /usr/sbin/nginx -g "daemon off;" Listens on 8080; serves /usr/share/nginx/html

The entrypoint is the server binary, with no init script. Initialise the data directory with initdb in an init container or job, then start postgres -D <datadir>. Mount the data directory as a volume owned by 65532.

Redis saves its RDB on SIGTERM, so mount a volume at /var/lib/redis for persistence.

Runs unprivileged on port 8080. Runtime paths /run, /var/lib/nginx/tmp and /var/lib/nginx/logs are writable by 65532; mount emptyDir volumes there with readOnlyRootFilesystem.