Examples
Every runnable example in this repo, mapped to the tutorial section it supports.
Each subdirectory under
examples/
is the runnable companion to a numbered section of the tutorial. The
Containerfiles, source, and compose files match what appears inline in the
chapters, so you can read a chapter and copy its snippets into a fresh
directory, or clone the repo and work straight from the example.
| Example | What it shows | Tutorial section |
|---|---|---|
node-example |
Multi-stage build on a hardened base, Node | §4 |
python-example |
Multi-stage build on a hardened base, Python | §4 |
go-example |
Multi-stage build on a hardened base, Go | §4 |
quarkus-example |
A Quarkus service on a hardened base | §4 |
compose-stack |
A multi-container app wired with Podman Compose | §7 |
ml-example |
A real-world scenario: ML inference on a hardened image | §11 |
Running an example
Each directory is self-contained: a Containerfile (or a compose.yaml for the
compose stack) and a README.md with the build and run steps. The build and run
commands use Podman; see
Prerequisites for the full
toolchain (Podman, podman-compose, cosign, syft, grype).