Podman Spawner — a Podman interface for container management
podman-spawner automates the creation and lifecycle management of Podman
containers, easing the creation of temporary podman images.
It was originally developed to review students projects, enabling to create containers on the fly for each student group and submission version.
Table of contents
Prerequisites
pod is a thin wrapper around Podman (a rootless Docker alternative).
Install it before anything else:
sudo apt install podman containers-storage
containers-storage is not strictly required, but it switches the storage
driver from vfs to overlay, which makes image builds significantly faster.
Verify it worked:
podman info | grep graphDriverName # should print: overlay
To pull images from Docker Hub, register it as an unqualified search registry:
mkdir -p ~/.config/containers/
echo 'unqualified-search-registries = ["docker.io"]' >> ~/.config/containers/registries.conf
For a small Podman introduction, see podman-intro.md.
Using pod
Installation
Install uv if you do not have it already:
curl -LsSf https://astral.sh/uv/install.sh | sh
Then, from the root of the pod repository:
uv tool install -e .
The pod command is now available for the current user.
Configuration
Every pod command reads config.toml from the current working directory.
A default file is created by pod init (see below); its keys are:
| Key | Default | Description |
|---|---|---|
prefix |
POD |
Prefix prepended to every container name. |
port |
2026 |
Guest port exposed by the container. |
user |
tester |
Username created inside the container at build time. |
Workflow overview
pod init # create the pod-build/ scaffold
↓ (edit Dockerfile, home-dir/, on_build.bash as needed)
pod build # build the Podman image
pod test # smoke-test the image interactively
↓
pod go <name> # open a container for a group / version
Commands
pod init
Creates a pod-build/ directory in the current directory (or uses the current
directory itself if it is already named pod-build), populated with a default
Dockerfile, config.toml, on_build.bash, and home-dir/.
pod init # create pod-build/ (fails if it already exists)
pod init --force # overwrite an existing pod-build/
pod init --update Dockerfile # refresh only one file, keeping local changes
pod build
Builds the Podman image from the pod-build/ directory.
Must be run from inside pod-build/ (or a directory that contains it).
pod build
The image is tagged <prefix>:latest (lower-cased), e.g. pod:latest.
pod test
Starts the dedicated test container (<prefix>-test-0.0) and attaches to it
interactively. Use this to verify that a freshly built image behaves correctly
before deploying it to students. The container is created if it does not exist.
pod test
pod go <name>
Attaches to a container, creating or restarting it as needed.
pod go GROUP-1.0
The host port is derived deterministically from the container name, so the same container always gets the same port across restarts.
pod list
Lists all containers belonging to this project (filtered by prefix).
pod list
pod info <name>
Prints the state and port-forwarding details of a container.
pod info GROUP-1.0
pod rm <name>
Removes a container permanently.
pod rm GROUP-1.0 # fails if the container is still running
pod rm GROUP-1.0 --force # stops and removes unconditionally
Note: due to a limitation in python-fire,
--forcemust come after the container name.
pod purge <regex>
Removes all containers whose full name matches regex
(matched with re.fullmatch, i.e. the pattern must cover the entire name
including the prefix).
pod purge 'POD-GROUP-1.*' # remove all versions for GROUP-1
pod purge 'POD-GROUP-1.*' --force # also remove running containers
pod purge-all
Removes every container belonging to this project, including the test container.
pod purge-all
pod purge-all --force
Metadata
Release files for podman-spawner 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| podman_spawner-0.4.0.tar.gz | 10.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| podman_spawner-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.5 kB
Release files / podman_spawner-0.4.0.tar.gz
| Download URL | podman_spawner-0.4.0.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80d37cb72d4d1bf3b8091e0b7b79c154a4fd330116199265c4f6f1d311c06909
|
|
BLAKE2b-256 checksum How to use checksums |
18ddada44f40bd14d5a39c28d676ef4678d67c73162fd5f8c9c6117ccbed39de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / podman_spawner-0.4.0-py3-none-any.whl
| Download URL | podman_spawner-0.4.0-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb4c5f97122f1eaa5d449606a6f4659d6d2f714a9b490db9e1ed6c7f4e20c00c
|
|
BLAKE2b-256 checksum How to use checksums |
0784c2917e26d4892fa248f533481b19c5fd03a0ade445fa1240eeb1b2b935e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for podman-spawner 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.