How ima.ge.cx works | Aidan Steele’s blog (usually about AWS)

submited by
Style Pass
2024-09-20 03:00:05

This article has been in my drafts for 380 days. It’s probably time I published it, before I forget even more details about how it works. ~A few~ 380+ days ago, I published ima.ge.cx. It’s a web frontend for browsing the contents of Docker images. It’s like a less powerful version of dive that doesn’t require you to pull images locally. It’s also worth noting that there’s a much more feature-rich (and likely less buggy) site that does a similar thing: Registry Explorer.

I planned on cleaning up the code significantly before publishing (I can’t have anyone see how the sausage is made), but in the year since writing it I have lost all context and motivation to do so. In an act of personal growth, I have pushed the code to GitHub in its incomplete state. There are deep link references to specific functions below. But first, here’s a rough rundown of how it works. First, an architecture diagram:

The second task is a Map state over those layers. The Index layer tar.gz task is invoked concurrently for each layer in the image. The input to that task is:

Leave a Comment