Rollback and recovery verification
Rollback means returning an application to a previously approved operational state after a failed change. An image rollback changes the desired image identity, but the complete recovery may also require compatible configuration, data, and infrastructure. Plan the recovery before deploying.
Worked example
Work offline: the scenarios and evidence are synthetic. Do not run hosted workflows, contact registries, use real credentials or deploy anything for this lesson. Keep the exercise offline. Before any separately authorized runtime check, verify the effective daemon, builder, runner or deployment identity as applicable; use synthetic data, reviewed inputs and bounded resources. Record missing evidence as NOT RUN.
Fictional release historyA = previous approved image; config v1; schema v1B = new image; config v2; schema v2After B: smoke fails; schema v2 is incompatible with ADecision: stop promotion, preserve evidence, assess data recovery planDo not switch blindly to AIf a new image has failed a smoke test, stop further rollout and gather relevant logs, health signals and deployment records. Check that the prior digest is retained, trustworthy and compatible with current configuration and persistent data. A database migration may not be reversible; restore from a verified backup can lose writes after its recovery point, so obtain authorization and consider a forward fix. Where compatibility is established, change the desired image to the prior approved digest using the platform’s reviewed deployment procedure, then verify readiness, business transactions and monitoring. Restarting a container is not the same as replacing its image. Record the observed recovery; do not claim zero downtime or data loss without tests. This worksheet never changes a real deployment. A recovery decision must account for the actual restore point, possible lost writes, current schema and configuration, and an authorized recovery owner. The supplied model returns a plan decision only; it performs no rollback and cannot measure RTO or RPO.
Common mistake
Repointing a tag or restarting existing containers does not reliably restore the previous image and data state. An incompatible schema can make a simple image rollback fail.
Manual practice
Write a recovery checklist for the fictional incident. Then assume schema v2 is backward-compatible: what must still be verified before and after reverting to A?
Worksheet: lab-fixtures/docker-ci-cd/06-rollback/scenario.txt.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Rollback and recovery verification — Knowledge check
Apply release and CI/CD reasoning to a fictional scenario.
A migration made the current schema incompatible with the previous image. What should you do first?
Which record is essential for selecting a prior image?
How should recovery be verified?