3 min read

The micro-SaaS challenge: Day 40 (Building Apocode #6)

The micro-SaaS challenge: Day 40 (Building Apocode #6)
Photo by Ian Taylor / Unsplash

I wrote previously about my intention of creating and launching 10 micro-SaaS products in 100 days, while building Apocode (a UK-based startup helping entrepreneurs create SaaS products without writing code).

Ten days ago, I announced the third micro-SaaS. This article introduces the fourth.

Docker registry

One of the most common ways to deploy applications in 2022 is to use Docker and Kubernetes.

Typically, Docker images would be built on a CI/CD platform such as CircleCI, and then pushed to a Docker registry. Later, the images would be pulled and used by Kubernetes.

Docker registries can be self-hosted or cloud-hosted. The most popular cloud-hosted registries are Dockerhub, AWS Elastic Container Registry (ECR), and Google Cloud Container Registry (GCR). Personally, I use AWS Elastic Container Registry as it is well integrated with the rest of AWS.

Without maintenance, the amount of data stored by a registry grows over time. For example, here is the usage graph of my registry:

Dockerhub does not charge for data storage, but it has other limitations. Storing images on AWS, Google Cloud or a self-hosted registry isn't free. It is therefore good practice to regularly clean up images to keep costs under control.

The problem with existing cleanup tools

AWS Elastic Container Registry can clean up images using lifecycle policies. They can remove images automatically after a certain period of time or once a specific number of images have been pushed to the registry.

Similarly, GCR Cleaner can be used to delete old images on Google Cloud.

Images are pulled each time a container is started, and containers can run for weeks or months. Therefore, the creation time (push) or the last download time (pull) of an image are unreliable indicators of its usage. And, unfortunately, AWS ECR lifecycle policies and GCR cleaner are at risk of deleting images still in use.

The solution

My fourth micro-SaaS, Image Registry Cleaner, solves the issue by allowing developers to delete only unused images from their registries.

Image Registry Cleaner keeps track of images through easy-to-set-up integrations with Kubernetes and Docker registries. At the moment it only supports AWS ECR but I will extend it to support Google Cloud Container Registry and self-hosted registries if there is a demand for it.

Twice a day, it scans ECR and generates a list of images that are unused or haven't been seen on Kubernetes for 7 days. Users can then choose which deletion recommendations should be applied.

Building Apocode

Over the past 10 days I also worked on the core of Apocode, and I had some interesting conversations with potential users.

Now onto the fifth micro-SaaS! It will be a bit different and less technical...

If you would like to provide feedback, create similar SaaS products, or follow the journey, you can join Apocode's product waitlist, subscribe to my blog, follow me on Twitter, or email me at nicolas@apocode.com