Docker Workflow Steps¶
The Docker plugin exposes reusable public workflow steps through DockerPlugin.get_steps().
Summary¶
| Step | Group | Used by built-in workflows |
|---|---|---|
select_service_group |
Compose | docker-up |
select_services_to_stop |
Compose | docker-down |
compose_up |
Compose | docker-up |
compose_down |
Compose | docker-down |
compose_status |
Compose | docker-up, docker-down, docker-status |
build_push_images |
Build | docker-build-push |
disk_usage |
Prune | docker-prune |
select_prune_targets |
Prune | docker-prune |
prune_resources |
Prune | docker-prune |
select_containers_to_remove |
Containers | docker-clean-containers |
remove_containers |
Containers | docker-clean-containers |
Compose¶
Use these steps to resolve which services to operate on and drive the compose lifecycle.
select_service_group: let the user pick a project-configuredservice_groupsentry (or "All services"), savingdocker_servicesto the workflow contextselect_services_to_stop: checkbox list of every compose service, all checked by default; unchecking one keeps it running. If everything stays checked, resolves to a fulldocker compose down; otherwise stops just the checked subset. Exits early (nothing to do) if the user unchecks everything.compose_up: start the services indocker_services(all services if absent/empty)compose_down: stop the services indocker_services(the whole project if absent/empty)compose_status: show a table of service state/status/health fordocker_services(all services if absent/empty), savingdocker_compose_statusto the workflow context. With no prior step settingdocker_services, it reports on every service - this is what powers the standalonedocker-statusworkflow.
Build¶
Use this step to build (and push, per target config) configured Docker images.
build_push_images: build every configuredbuild_targetsentry, or a single one whenbuild_target_nameis set in the workflow context, savingdocker_build_resultsto the workflow context. Streamsdocker buildx buildoutput into a live, read-only text area per target (mouse-selectable and copyable) instead of a plain spinner.
Prune¶
Use these steps to inspect and reclaim host-wide Docker disk usage. Unlike the Compose steps above, these are not scoped to this project's compose file - they report on the whole Docker host.
disk_usage: show a table of Docker's disk usage breakdown (images, containers, local volumes, build cache) viadocker system df, savingdocker_disk_usageto the workflow contextselect_prune_targets: checkbox list of resource categories (stopped containers, dangling images, build cache, unused volumes), nothing checked by default since pruning is destructive. Exits early if nothing is selected. Note Docker itself refuses to remove a volume still attached to any container, sovolumesnever touches an in-use volume.prune_resources: rundocker ... prunefor each target inprune_targets, savingdocker_prune_resultsto the workflow context
Containers¶
Use these steps to inspect and clean up containers across the whole host, not just this project.
select_containers_to_remove: list every container on the host (running and stopped) for context, then offer a checkbox list of the stopped ones for removal, nothing checked by default. Exits early if there are no stopped containers, or if nothing is selected.remove_containers: remove the containers indocker_container_idsviadocker rm(without-f, so Docker itself refuses to remove a still-running container)