DEV Community

Cover image for ๐Ÿง™โ€โ™‚๏ธ Docker Wizard: Because Setting Up Dev Environments Shouldn't Feel Like Dark Magic
Youssef Ayman
Youssef Ayman

Posted on

๐Ÿง™โ€โ™‚๏ธ Docker Wizard: Because Setting Up Dev Environments Shouldn't Feel Like Dark Magic

Ever found yourself copy-pasting docker-compose snippets from Stack Overflow at 2 AM, trying to remember if PostgreSQL needs port 5432 or 5433? Yeah, me too. That's why I built Docker Wizard.

๐ŸŽฏ The Problem (AKA Developer Pain Points)

Picture this: You're starting a new project. You need a database, maybe Redis for caching, probably RabbitMQ because microservices are cool, and oh yeahโ€”a reverse proxy would be nice. So you:

  1. ๐Ÿ” Google "postgres docker-compose example"
  2. ๐Ÿ“‹ Copy-paste some YAML you don't fully understand
  3. ๐Ÿคž Hope the port mappings don't conflict with that other project you forgot to shut down
  4. ๐Ÿ˜ฑ Realize you need volumes for persistence
  5. ๐Ÿ”„ Repeat for each service
  6. โ˜• Your coffee is cold and you haven't written a line of actual code yet

There had to be a better way.

๐Ÿ’ก The Solution: A Wizard That Actually Works

Docker Wizard is a CLI/TUI tool written in Go that scaffolds your entire Docker development stack through an interactive, step-by-step wizard. It:

โœจ Detects your project language (Go, Node, Python, Ruby, PHP, Java, .NET)

๐ŸŽจ Generates a production-ready Dockerfile tailored to your stack

๐Ÿ› ๏ธ Lets you pick services by category (databases, queues, cache, proxies)

๐Ÿ“ฆ Spits out a complete docker-compose.yml with sensible defaults

๐Ÿ”„ Merges with existing files instead of nuking them (your customizations are safe!)

๐ŸŽช The Fun Part: Why This Tech Stack?

Why Go?

Because I needed something fast, compiled, and cross-platform. Also, Go's standard library is chef's kiss ๐Ÿ‘จโ€๐Ÿณ๐Ÿ’‹ for file operations and CLI tools. Plus, goroutines made the terminal animations smooth as butter.

Why Bubble Tea for the TUI?

Have you seen how gorgeous Bubble Tea UIs are? It's like the React of terminal interfaces. I wanted developers to actually enjoy running this tool. Also, the Elm architecture pattern keeps the code maintainable (future me says thanks).

The TUI features:

  • ๐ŸŽจ Styled mode with Lip Gloss animations (fancy!)
  • ๐Ÿ“„ Plain mode for those crusty old terminals
  • ๐Ÿ’ฌ CLI interactive mode if you hate TUIs for some reason
  • ๐Ÿค– Batch mode for CI/CD workflows

The Merge Logic: A Love Story

The hardest part? User-priority merging. If you already have a docker-compose.yml, Docker Wizard doesn't just overwrite it. It:

  • Preserves your existing values
  • Adds new services you selected
  • Backs up the original to .bak
  • Merges environment variables, ports, and volumes intelligently

This took way longer to get right than I'd like to admit. Turns out YAML merging is a deep rabbit hole involving map vs list syntax, port conflict resolution, and dependency ordering. I have a newfound respect for Kubernetes maintainers.

๐Ÿšง Still in Development (Help Wanted!)

Here's the real talk: Docker Wizard is still cooking. It works, it's usable, but it's not done. The "Planned / TBD" section in the knowledge base includes:

  • ๐Ÿงช More comprehensive testing (snapshot tests, fixture projects)
  • ๐Ÿ”Œ Extensibility docs (so you can add your own services/templates)
  • ๐Ÿ“ฆ Better distribution (Homebrew formula, anyone?)
  • ๐Ÿ› Edge cases I haven't discovered yet (spoiler: you'll find them)

Current status:

  • โœ… Core wizard flow working
  • โœ… 7 languages supported
  • โœ… 15+ services in the catalog (MySQL, Postgres, Redis, Kafka, MongoDB, etc.)
  • โœ… Auto-tagging CI pipeline (every push to main = new release)
  • โš ๏ธ Environment map syntax merging is still WIP
  • โš ๏ธ Terminal compatibility testing needed

๐ŸŽฎ Try It Out (I Need Your Feedback!)

Quick Start

# One-liner install
curl -fsSL https://raw.githubusercontent.com/yosp313/docker-wizard/main/install.sh | sh

# Or clone and run
git clone https://github.com/yosp313/docker-wizard
cd docker-wizard
go run .
Enter fullscreen mode Exit fullscreen mode

What I Need From You

๐Ÿ› Found a bug? Open an issue!

๐Ÿ’ก Have ideas? I'm all ears

๐ŸŽจ Terminal looks weird? Tell me your OS/terminal combo

๐Ÿ“š Want to add a service? PRs welcome! (Edit config/services.json)

โญ Like the project? Star it on GitHub (it makes my dopamine receptors happy)

๐ŸŽฏ What Works Right Now

# Run the wizard with different modes
docker-wizard                                      # Styled TUI (default)
docker-wizard --mode plain                         # Plain text TUI
docker-wizard --mode cli                           # Prompt-based flow
docker-wizard --mode batch --services mysql,redis  # Non-interactive

# Subcommands
docker-wizard add kafka --write    # Add services to existing compose
docker-wizard list                 # Show available services
Enter fullscreen mode Exit fullscreen mode

๐Ÿค” Philosophy: Sensible Defaults, Easy Overrides

The generated files follow conventions that make sense:

  • Services use an app-net network
  • Only "public" services expose host ports (bye bye, port chaos)
  • Multi-stage builds for compiled languages
  • Templates support APP_START_CMD environment variable for custom start commands

But if you need to tweak something? Edit config/services.json or config/dockerfiles.json. No need to fork the entire project just to change a port number.

๐ŸŽฌ What's Next?

I'm working on:

  1. Better documentation (tutorials, video walkthrough)
  2. More services (Elasticsearch, Prometheus, Jaeger...)
  3. Plugin system (so you can distribute custom templates)
  4. Smarter detection (monorepos, multiple languages in one project)

๐Ÿ™ Join the Quest

This is a solo project (for now), and I'd love for it to become a community tool. Whether you're a Go wizard ๐Ÿง™, a Docker devotee ๐Ÿ‹, or just someone who's tired of YAML yak-shavingโ€”your input matters.

Repository: yosp313/docker-wizard

Vibes: Chaotic good

Coffee consumption during development: Yes

Drop a comment with:

  • What services you'd want to see added
  • Your most cursed docker-compose experience
  • Whether the name "Docker Wizard" is too cheesy (it is, and I'm not changing it)

Let's make Docker setup less painful, one wizard spell at a time. ๐Ÿช„โœจ


P.S. - If you read this far, you're legally required to try the tool and report at least one bug. I don't make the rules. ๐Ÿ˜„

Top comments (0)