Skip to content

Latest commit

 

History

History
executable file
·
130 lines (100 loc) · 4.75 KB

File metadata and controls

executable file
·
130 lines (100 loc) · 4.75 KB

Container Comparison: FlutterBench vs Project Containers

Overview

We use two different container approaches for Flutter development:

  1. FlutterBench - Heavy development workbench
  2. Project Containers - Lightweight debugging/running environment

📊 Size & Performance Comparison

Aspect FlutterBench Monster Project Container
Dockerfile Lines 729 lines 125 lines (-83%)
Build Time 10-15 minutes 2-3 minutes (-80%)
Image Size ~2GB+ ~500MB (-75%)
Container Startup 30-60 seconds 5-10 seconds (-80%)
Use Case Heavy development Debug & light work

🔧 Tool Comparison

FlutterBench (THE MONSTER) Includes:

  • Languages & Runtimes: .NET SDK, Node.js, Python, Go, Ruby, Java, Bun, Deno
  • Cloud Tools: Docker, Kubernetes, Helm, Azure CLI, Terraform, Pulumi
  • Development Tools: Full Android SDK with emulators, NDK, multiple build tools
  • Database Clients: PostgreSQL, MySQL, SQLite, Redis
  • Text Editors: Vim, Neovim, Emacs, Nano
  • Modern CLI Tools: Starship, Zoxide, btop, exa, ripgrep, fd-find, fzf, bat
  • Network Tools: nmap, netcat, httpie, tcpdump, wireshark
  • Version Control: Git, SVN, Mercurial, Git LFS
  • DevOps: GitHub CLI, Firebase CLI, Fastlane, Sentry CLI, k6
  • Media Tools: ImageMagick, FFmpeg
  • Documentation: Pandoc, LaTeX
  • Flutter Tools: 20+ global Dart packages and CLI tools
  • Mobile Development: CocoaPods, Figma tools, Shorebird

Project Container (LIGHTWEIGHT) Includes:

  • Core Utilities: curl, wget, git, unzip, xz-utils, ca-certificates
  • Flutter Essentials: Flutter SDK 3.24.0 (stable only)
  • Android Basics: ADB, fastboot, minimal platform-tools
  • Java Runtime: OpenJDK 17 (for Android builds)
  • Shell: zsh, bash, Oh My Zsh (for better UX)
  • Basic Tools: nano, tree, jq, less (for debugging/inspection)
  • ADB Configuration: Pre-configured for shared ADB server

🎯 Usage Philosophy

When to Use FlutterBench:

  • Heavy Development Work: Code generation, complex builds, polyglot projects
  • Tool-Heavy Tasks: Database work, cloud deployments, infrastructure
  • Learning/Exploration: Trying new tools, experimenting with different stacks
  • Complex Flutter Projects: Using advanced tooling, custom build processes
  • Multi-language Projects: Working with .NET backend + Flutter frontend

When to Use Project Containers:

  • Debugging & Testing: Running your app, debugging issues, testing features
  • Light Development: Small edits, quick fixes, code reviews
  • CI/CD: Automated builds where you want fast, minimal containers
  • Demo/Presentation: Quick project startup for demos
  • Resource-Constrained: Limited RAM/CPU environments

🚀 Performance Impact

FlutterBench Monster:

# First time build
docker build . # ~10-15 minutes, downloads GBs of tools

# Container startup
docker run ... # ~30-60 seconds to become responsive

# Memory usage
# ~500MB-1GB+ RAM usage at idle

Project Container:

# First time build
docker build . # ~2-3 minutes, minimal downloads

# Container startup  
docker run ... # ~5-10 seconds to become responsive

# Memory usage
# ~100-200MB RAM usage at idle

🔄 Development Workflow

Recommended Workflow:

  1. Start with FlutterBench for initial project setup, code generation, dependency management
  2. Switch to Project Container for debugging, testing, and running the app
  3. Return to FlutterBench when you need complex tooling or polyglot work

Example Day:

# Morning: Heavy development in FlutterBench
cd FlutterBench
code .  # Opens with full toolchain

# Afternoon: Debug specific app issue in project container  
cd Dartwingers/myapp
code .  # Opens lightweight container, quick startup

# Evening: Deploy and infrastructure work in FlutterBench
cd FlutterBench  # Back to the monster for deployment tasks

📏 Resource Requirements

FlutterBench System Requirements:

  • RAM: 8GB+ recommended (4GB minimum)
  • CPU: 4+ cores recommended
  • Disk: 5GB+ free space
  • Network: Good bandwidth for initial setup

Project Container System Requirements:

  • RAM: 4GB+ recommended (2GB minimum)
  • CPU: 2+ cores sufficient
  • Disk: 1GB+ free space
  • Network: Minimal after first build

🎯 Summary

FlutterBench = Swiss Army Knife (heavy but has everything)
Project Container = Precision Screwdriver (light but focused)

Both containers connect to the same shared ADB infrastructure, so you get consistent device connectivity regardless of which container you're using.

This dual-container approach optimizes for both developer productivity (FlutterBench) and resource efficiency (Project containers).