Skip to content

ContainerEngine (podman)

Type-safe wrapper for Podman, the daemonless container engine.

Podman is used for creating containerized builds, particularly PyInstaller executables in a reproducible Linux environment.

Replacing with Docker

Switching to Docker requires two changes because workflow steps use hardcoded GitHub Actions (not the .I pattern):

1. Subclass the Tool

# myapp/rig/tools/container_engine.py
from pyrig.rig.tools.container_engine import ContainerEngine as BaseCE

class ContainerEngine(BaseCE):
    def name(self) -> str:
        return "docker"

2. Override WorkflowConfigFile Steps

The workflow uses a hardcoded GitHub Action to install Podman. You must also override this:

# myapp/rig/configs/base/workflow.py
from pyrig.rig.configs.base.workflow import WorkflowConfigFile as BaseWorkflowConfigFile

class WorkflowConfigFile(BaseWorkflowConfigFile):

    def step_install_container_engine(self, *, step=None):
        return self.step(
            step_func=self.step_install_container_engine,
            uses="docker/setup-buildx-action@v3",
            step=step,
        )

This is an example of static vs dynamic - see Architecture for why some components require explicit overrides.