Update Docker Containers by Image Digest via Docker API
Update Docker Containers by Image Digest via Docker API
Regular price
£68.99
Regular price
£68.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Update Docker Containers by Image Digest via Docker API
Regular price
£68.99
Regular price
£68.99
Sale price
Unit price
/
per
Automatically update your Docker container when the image digest changes
This n8n workflow runs hourly to detect updated Docker image digests via the Docker Registry API, then pulls the new image and recreates your container—waiting for health checks before confirming success or alerting if unhealthy.
What this workflow does
- Runs every hour on a schedule.
- Loads configuration (target container name, image reference, and host/container port mapping) from a central “Settings” step.
- Inspects digests using the Docker Registry API to read the currently published image manifest digest, then compares it to the digest of the same image inspected locally.
- Decides whether an update is needed by comparing the published digest vs. the local image digest.
- Updates safely when changed: pulls the latest image, removes the existing container, and creates a new container using the configured port mapping, with a health check and restart policy.
- Waits for health: monitors the new container until it becomes healthy or until a 120-second timeout occurs.
- Routes outcomes: ends at a success placeholder if healthy, or an unhealthy-alert placeholder if not.
- No change when up to date: if digests match, the workflow ends without modifying containers.
Use cases
- Keep a production or staging service current without manual redeploys, based on Docker image digest changes.
- Improve reliability by recreating containers only when a new digest is published and confirming readiness via health checks.
- Run digest-aware maintenance for SaaS environments where consistent container health matters.
Technical details
-
Docker API integration: uses
n8n-nodes-docker-apidockerto inspect images and manage containers on your Docker host. -
Core logic nodes:
if,set,code, andno op, plussticky notefor workflow clarity. -
Health check compatibility: the workflow assumes a health check command that defaults to
wgetagainsthttp://localhost:<containerPort>/—adjust it to match your application endpoint.
