The Idea and the Steps

Published on 2024-10-30 - by: me
tainer.run: The Idea and the Steps
A badly AI-generated image to make this blog post look less boring - I kind of love it though.

For a while now I've been playing with the idea of making a platform that makes it (very) easy and (very) cheap to host your Docker containers by giving the user direct access to the Docker daemon by securely allowing connection to the socket. This would allow users to use their local Docker CLI and/or Docker Desktop to manage their containers.
This series of blog posts will document the process of me building this platform - mostly for myself to look back on but maybe it'll be interesting to others as well.

This specific post will outline the steps I think I'll have to take to achieve this goal. The steps I'm currently planning to take are:

  1. Learn how to provision resources on a cheap cloud provider like Hetzner Cloud or DigitalOcean with either OpenTofu, Pulumi, or Ansible.
  2. Enhance the security of the Debian image that will be used to run the Docker daemon and securely expose the Daemon socket port. This will include safely setting up SSH, automatic security updates, an intrustion detection tool like Fail2Ban, and possibly a firewall on either OS or provider level.
  3. Implement basic monitoring and logging on a system level by using OpenTelemetry so I can personally monitor the platform. Users will get access to logs and metrics later as this outside the scope of the MVP. Alerts and notifications are included in this step.
  4. Add automated backups and snapshots of both the systems and the containers running on the platform. This will not be accessible to users in at least the MVP and perhaps never as it is only intended for disaster recovery.
    This is completely new for me so this step will have to include a lot of research.
  5. A simple test suite to make sure the platform is working as expected. This will include automated tests for the provisioning, security, monitoring, and backups. To keep it simple I'll use E2E tests built in TypeScript with Playwright where needed.
  6. Build a simple frontend that allows users to CRUD their servers. This will be built with Next.js, tRPC, and Auth.js. This is not necessarily the best fitting or most efficient stack but it is what I'm most comfortable with. The API will explicitly not be exposed to the user as I expect users to rarely need to interact with the platform after the initial setup.
    This step is the one I'm most confident in and is therefore described superficially.
  7. Implement a basic billing system that allows users to pay for their servers. This will be done with Stripe.
  8. Create a landing page that explains what the platform does and how to get started. It will also call out when this platform is not suitable for the user: pretty much anytime they need anything close to production level reliability. This step is very high level for now and will be fleshed out later.

So that's the plan for now. I'm certain it'll change a LOT as I start working on it but I think it's a good starting point. I'll try to keep this blog updated with my progress and any changes to the plan. I'm excited to see where this project will go but I'll for sure learn a lot from it.

Thanks for reading and I hope you'll stick around for the next post!