<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Suman Giri</title>
    <description>The latest articles on DEV Community by Suman Giri (@suman_giri_5eeb46b860a02c).</description>
    <link>https://dev.to/suman_giri_5eeb46b860a02c</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2882137%2Fd627918c-c123-4b3a-b7b6-23289391da8d.png</url>
      <title>DEV Community: Suman Giri</title>
      <link>https://dev.to/suman_giri_5eeb46b860a02c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/suman_giri_5eeb46b860a02c"/>
    <language>en</language>
    <item>
      <title>I Automated Docker Pulls with Archon in 30 Lines</title>
      <dc:creator>Suman Giri</dc:creator>
      <pubDate>Sun, 12 Apr 2026 21:02:33 +0000</pubDate>
      <link>https://dev.to/suman_giri_5eeb46b860a02c/i-automated-docker-pulls-with-archon-in-30-lines-2pj7</link>
      <guid>https://dev.to/suman_giri_5eeb46b860a02c/i-automated-docker-pulls-with-archon-in-30-lines-2pj7</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimage.pollinations.ai%2Fprompt%2Farchon-automated-docker-pulls-on-a-laptop-concept-illustration-flat-design-colorful%3Fwidth%3D1280%26height%3D720%26nologo%3Dtrue%26enhance%3Dtrue%26seed%3D42" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimage.pollinations.ai%2Fprompt%2Farchon-automated-docker-pulls-on-a-laptop-concept-illustration-flat-design-colorful%3Fwidth%3D1280%26height%3D720%26nologo%3Dtrue%26enhance%3Dtrue%26seed%3D42" alt="Automating Docker pulls with Archon" width="1024" height="576"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It was 8am on a Monday and I had just grabbed a cup of chai from the street vendor near my apartment in Kolkata when I noticed my Docker deploy script had been running for 25 minutes, causing my CoderFact website to be unavailable. Again. I was trying to get everything ready for a big traffic spike expected that day.&lt;/p&gt;

&lt;p&gt;Look, I've dealt with slow internet and power cuts in Kolkata, but this was different — my Docker pull commands were just hanging indefinitely. I'm not gonna lie, it was frustrating.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction to Docker Automation
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimage.pollinations.ai%2Fprompt%2Fdocker-automation-with-archon-and-python-clean-whiteboard-diagram-flowchart-arrows-nodes%3Fwidth%3D900%26height%3D500%26nologo%3Dtrue%26enhance%3Dtrue%26seed%3D46" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimage.pollinations.ai%2Fprompt%2Fdocker-automation-with-archon-and-python-clean-whiteboard-diagram-flowchart-arrows-nodes%3Fwidth%3D900%26height%3D500%26nologo%3Dtrue%26enhance%3Dtrue%26seed%3D46" alt="Docker automation workflow" width="900" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Honestly, I've been using Docker for a while now, and I've always known that manual Docker pulls can be a pain. But this particular Monday morning was when I decided I'd had enough. I started searching for a way to automate my Docker pulls — and that's when I stumbled upon Archon.&lt;/p&gt;

&lt;p&gt;What I needed was a way to automate my Docker pulls and deployments without having to manually run &lt;code&gt;docker-compose pull&lt;/code&gt; every time. I mean, who has the time for that, right? &lt;/p&gt;

&lt;p&gt;I first tried using &lt;code&gt;docker pull&lt;/code&gt; with the &lt;code&gt;--all-tags&lt;/code&gt; flag, but that didn't solve the issue. Here's what I tried:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;subprocess&lt;/span&gt;

&lt;span class="c1"&gt;# Attempt to pull all Docker images
&lt;/span&gt;&lt;span class="n"&gt;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;docker&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pull&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--all-tags&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What this does is attempt to pull all Docker images, but it didn't quite work out for me — the process would still hang sometimes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Manual Docker Pulls
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Manual Docker pull script&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Example of a manual Docker pull script&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;image &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;docker images &lt;span class="nt"&gt;-q&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
&lt;/span&gt;docker pull &lt;span class="nv"&gt;$image&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I then attempted to use a Bash script to automate the pulls, but it was cumbersome and prone to errors. I mean, I'm a frontend dev, not a sysadmin, so this was way out of my comfort zone. &lt;/p&gt;

&lt;p&gt;The Bash script looked something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="c"&gt;# Loop through all Docker images and pull them&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;image &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;docker images &lt;span class="nt"&gt;-q&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;docker pull &lt;span class="nv"&gt;$image&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What this does is loop through all Docker images and attempt to pull them, but like I said, it was error-prone and not really what I needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementing Archon for Automated Docker Pulls
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimage.pollinations.ai%2Fprompt%2Farchon-automating-docker-pulls-and-deployments-software-architecture-diagram-system-design-boxes%3Fwidth%3D700%26height%3D380%26nologo%3Dtrue%26enhance%3Dtrue%26seed%3D59" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimage.pollinations.ai%2Fprompt%2Farchon-automating-docker-pulls-and-deployments-software-architecture-diagram-system-design-boxes%3Fwidth%3D700%26height%3D380%26nologo%3Dtrue%26enhance%3Dtrue%26seed%3D59" alt="Archon automation architecture" width="700" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's when I decided to give Archon a shot. I mean, it's a Python library, so I figured it would be easy to integrate with my existing Docker setup. And boy, was I right. &lt;/p&gt;

&lt;p&gt;Here's the core code snippet that uses Archon to automate my Docker pulls and deployments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;archon&lt;/span&gt;

&lt;span class="c1"&gt;# Define a task to pull and deploy Docker images
&lt;/span&gt;&lt;span class="nd"&gt;@archon.task&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;pull_and_deploy&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
  &lt;span class="c1"&gt;# Pull all Docker images
&lt;/span&gt;  &lt;span class="n"&gt;archon&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;docker&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pull&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;--all-tags&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

  &lt;span class="c1"&gt;# Deploy the images
&lt;/span&gt;  &lt;span class="n"&gt;archon&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;docker-compose&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;up&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-d&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="c1"&gt;# Run the task
&lt;/span&gt;&lt;span class="nf"&gt;pull_and_deploy&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What this does is define a task that pulls all Docker images and then deploys them using &lt;code&gt;docker-compose&lt;/code&gt;. It's pretty straightforward, and it's been a game-changer for me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Results and Future Improvements
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimage.pollinations.ai%2Fprompt%2Fdocker-pull-and-deployment-time-comparison-graph-dashboard-benchmark-graph-before-after%3Fwidth%3D900%26height%3D500%26nologo%3Dtrue%26enhance%3Dtrue%26seed%3D44" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimage.pollinations.ai%2Fprompt%2Fdocker-pull-and-deployment-time-comparison-graph-dashboard-benchmark-graph-before-after%3Fwidth%3D900%26height%3D500%26nologo%3Dtrue%26enhance%3Dtrue%26seed%3D44" alt="Automation results comparison" width="900" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, what were the results? Well, I went from 32 minutes to 2 minutes and 14 seconds for a full Docker image pull and deployment. That's a huge time savings, and it's been a massive relief. &lt;/p&gt;

&lt;p&gt;While implementing Archon, I discovered that it also provided built-in support for automated retries and failure notifications, which ended up saving me from a potential outage caused by a Docker Hub outage. I mean, talk about a nice surprise, right? &lt;/p&gt;

&lt;p&gt;If you're interested in learning more about how I use Archon and other DevOps tools at CoderFact, you can check out my blog at &lt;a href="http://coderfact.com" rel="noopener noreferrer"&gt;coderfact.com&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimage.pollinations.ai%2Fprompt%2Fcoderfact-website-with-archon-and-docker-modern-dark-ui-tool-screenshot-dashboard%3Fwidth%3D700%26height%3D380%26nologo%3Dtrue%26enhance%3Dtrue%26seed%3D47" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimage.pollinations.ai%2Fprompt%2Fcoderfact-website-with-archon-and-docker-modern-dark-ui-tool-screenshot-dashboard%3Fwidth%3D700%26height%3D380%26nologo%3Dtrue%26enhance%3Dtrue%26seed%3D47" alt="CoderFact website with automation" width="700" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you build this, drop a comment — I'm genuinely curious what you use it for. And if it saves you time, the clap button is right there.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;More free tools and tutorials at &lt;a href="https://coderfact.com" rel="noopener noreferrer"&gt;CoderFact&lt;/a&gt;. AI-assisted draft, reviewed and edited by me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>devops</category>
      <category>automation</category>
      <category>archon</category>
    </item>
  </channel>
</rss>
