A production-ready Docker container optimized for Flutter Web development with AI agent support. This container provides a complete development environment with authentication, testing tools, and AI integration capabilities.
- 🐳 Debian 12 base with Flutter 3.32 SDK (Web-only, no mobile SDKs)
- 🔐 Secure authentication for Google Cloud, Firebase, and GitHub
- 🤖 AI agent ready with Claude Code and Python web scraping tools
- 🌐 Chrome browser for web testing (not Chromium)
- 🛠️ Development tools including Node.js, Python, and testing frameworks
- 🎨 Enhanced terminal with Oh My Zsh and Powerlevel10k
- 📦 Persistent volumes for Flutter SDK, pub cache, and npm packages
-
Clone this repository:
git clone https://github.com/momentous-developments/AI-Agent-Docker-Environments.git cd AI-Agent-Docker-Environments/flutter-web -
Run the setup script:
./setup.sh
-
Configure your environment: Edit the
.envfile with your settings:- Set your
PROJECT_NAME - Add your
GITHUB_TOKEN - Configure Google Cloud authentication
- Set your
WORKSPACE_MOUNTpath
- Set your
-
Start the container:
./start.sh
-
Access the container:
docker exec -it flutter-web-dev zsh
Copy .env.example to .env and configure:
# Essential configuration
PROJECT_NAME=your-project-name
WORKSPACE_MOUNT=/path/to/your/flutter/project
GITHUB_TOKEN=ghp_YOUR_TOKEN_HERE
GOOGLE_CLOUD_PROJECT=your-gcp-projectService accounts provide persistent, non-expiring authentication ideal for containers.
Quick Setup:
- Download service account key from GCP Console
- Place in
./auth/service-account-key.json - Start container - authentication is automatic!
See SERVICE_ACCOUNT_SETUP.md for detailed instructions.
# In .env file:
USE_HOST_GCLOUD_AUTH=true
GOOGLE_APPLICATION_CREDENTIALS=- Flutter 3.32 (Web-only)
- Node.js 18 with npm
- Python 3.11 with pip
- Git with GitHub CLI
- Google Cloud SDK
- Firebase CLI
- Google Chrome (official)
- Lighthouse
- Puppeteer & Playwright
- Jest
- Axe-core (accessibility)
- Web Vitals
- BeautifulSoup4
- Requests
- Pillow (PIL)
- Selenium
- Pandas & NumPy
- Claude Code CLI
- Anthropic API support
- OpenAI API support (configurable)
- MCP Servers:
- Context7 (SSE transport)
- Playwright (browser automation)
# Flutter shortcuts
flw # Run Flutter web server
flb # Flutter build
flt # Flutter test
flc # Flutter clean
# Quick commands
quick-serve # Run web server from current directory
quick-build # Build web app
quick-test # Run tests
quick-fix # Apply dart fixes
# Container info
container-status # Show full configuration statusThe container is optimized for AI agent usage:
- Authentication is automatic - credentials are set up on container start
- Python packages are pre-installed for web scraping
- Helper scripts streamline common tasks
- Status checking with
container-statuscommand - Working directory stability -
CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1preventscdcommands from permanently changing the directory, avoiding AI agent confusion
-
Never commit sensitive files:
.envfiles- Service account JSON files
- API keys or tokens
-
Use environment variables for all secrets
-
Review
.gitignorebefore committing -
Rotate credentials regularly
Edit the Dockerfile:
RUN pip3 install --user --break-system-packages \
your-package-hereEdit the Dockerfile:
RUN npm install -g \
your-package-hereUpdate in .env:
FLUTTER_VERSION=3.33.0- Check port conflicts:
docker ps - Review logs:
docker-compose logs - Ensure Docker daemon is running
If Playwright browsers fail to launch, try running the container with:
docker run --ipc=host --init --cap-add=SYS_ADMIN your-container--ipc=host: Prevents Chromium memory issues--init: Prevents zombie processes--cap-add=SYS_ADMIN: Required for Chromium sandbox
- For host auth: Run
gcloud auth loginon host - For service account: Check JSON file in
./auth/ - GitHub: Ensure token has correct permissions
- Ensure workspace mount path exists
- Check file ownership matches container user
See CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see LICENSE file.