Templates / Auto-update Docker containers on new image digests with Docker API

Auto-update Docker containers on new image digests with Docker API

Unknown

by Ramy Gamal · 2 views · created 2026-08-01

Unknown. This template uses community nodes we can't verify statically. Uses community nodes that can't be verified statically (unverified community packages are off by default in 3.0). Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This workflow has 14 nodes and runs on a schedule (every hour). Along the way it connects Docker Api (community).

How it runs

Trigger: On a schedule (every hour).

  1. Settings (Edit Fields (Set)): sets 4 fields: containerName, image, hostPort…
  2. Check registry for a new digest (Docker): distribution inspect (image)
  3. Inspect the local image (Docker): inspect image
  4. Has the image changed? (Code): runs custom JavaScript code
  5. Update needed? (If): checks a condition and branches into true / false
  6. Pull the new image (Docker): pull image
  7. Remove the old container (Docker): remove (container)
  8. Create the new container (Docker): create (container)
  9. Wait until it is healthy (Docker): wait for state (container)
  10. Did it come up healthy? (If): checks a condition and branches into true / false

Services it uses

Docker Api (community)

Before you upgrade to n8n 3.0

We can't fully verify this one: it relies on 1 community package, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).

  • Check that n8n-nodes-docker-api is verified or supports 3.0 (used in Check registry for a new digest, Inspect the local image, Pull the new image).

Nodes used (6)

From the author

Quick overview This workflow runs hourly to check a Docker registry for updated image digests, and if a new image is available it pulls it, recreates a Docker container with the configured port mapping, and waits for the container health check to pass. How it…

Excerpt from Ramy Gamal's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.