Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Runtimes

Twerk supports multiple execution environments for tasks.

Docker (Default)

Tasks run in isolated Docker containers using the bollard crate.

[runtime]
type = "docker"

Or via environment:

TWERK_RUNTIME_TYPE=docker

Docker-specific options:

[runtime.docker]
config = ""              # Path to Docker config
privileged = false        # Privileged container mode
image.ttl = "24h"        # Image cache TTL

Podman

Daemonless Docker alternative:

[runtime]
type = "podman"
TWERK_RUNTIME_TYPE=podman

Podman-specific options:

[runtime.podman]
privileged = false
host.network = false     # Use host network

Shell

Run directly on the host (for development/testing):

[runtime]
type = "shell"
TWERK_RUNTIME_TYPE=shell

Warning: Shell runtime executes arbitrary code on the host. Use only in trusted environments.

Shell-specific options:

[runtime.shell]
cmd = ["bash", "-c"]     # Shell command
uid = "1000"             # Run as specific user
gid = "1000"            # Run with specific group

Environment Variables in Tasks

VariableDescription
TWERK_OUTPUTWrite task output here
TWERK_TASK_IDCurrent task ID
TWERK_JOB_IDCurrent job ID

Next Steps