Overview
While Miku Miku Beam doesn’t include a pre-built Dockerfile in the repository, it’s designed to be Docker-ready and can be easily containerized for deployment. This guide will walk you through creating and deploying MMB in a Docker container.Creating a Dockerfile
Multi-stage Dockerfile
Create aDockerfile in the project root with the following content:
Docker Compose Setup
Create adocker-compose.yml file for easier deployment:
Building the Image
Configuration Files
Before running the container, prepare the required configuration files:Running the Container
Using Docker Run
Using Docker Compose
Environment Variables
Log output format. Set to
json for structured logging in productionAllow running attacks without proxies. Set to
true to enableVolume Mounts
| Host Path | Container Path | Purpose |
|---|---|---|
./data | /app/data | Proxies and user agents storage |
./config.toml | /app/config.toml | Configuration file (optional) |
Port Mappings
| Container Port | Protocol | Purpose |
|---|---|---|
| 3000 | HTTP | Web UI and API |
Health Checks
Add a health check to your Dockerfile:Docker CLI Access
You can also run attacks using the CLI tool inside the container:Production Optimization
Troubleshooting
Container starts but web UI is not accessible
Container starts but web UI is not accessible
Check if the web client was built correctly:If empty, rebuild the image ensuring the web-client build stage completes successfully.
No proxies available error
No proxies available error
Ensure the data volume is mounted correctly and contains proxies.txt:Or run with
ALLOW_NO_PROXY=true to disable proxy requirement.Permission denied errors
Permission denied errors
If using the non-root user setup, ensure proper permissions:
Next Steps
Production Deployment
Learn how to deploy MMB in production environments
Configuration
Configure server settings and parameters