A lightweight Go CLI that auto-detects any project's stack and generates a production-ready Dockerfile from it — then builds and runs the container with one command. No Docker knowledge required.
Go 1.23 Docker YAML
deploybox init <dir>
│
├─ Scans for build files (pom.xml, requirements.txt, package.json, ...)
├─ Auto-detects language → Java, Python, Node, Rust, Go
├─ Reads deploy.yaml (optional) → overrides name, port, env, volumes, command
├─ Generates multi-stage Dockerfile with layer caching
└─ Writes Dockerfile (and docker-compose.yml if depends_on is set)
deploybox up <dir>
│
├─ Same pipeline as init (auto-generates if no Dockerfile exists)
├─ docker build -t deploybox-<name>
├─ docker run -d --rm (or docker compose up -d for multi-service)
└─ Container running
deploybox down <dir>
└─ docker compose down or docker stop (idempotent)
deploybox logs <dir> [-f]
└─ docker logs [-f] <container>
| Build file found | Language | Docker base image |
|---|---|---|
pom.xml |
Java 21 + Maven | eclipse-temurin:21-jre-alpine (multi-stage) |
requirements.txt |
Python 3.12 + pip | python:3.12-slim |
package.json |
Node.js + npm | node:22-alpine |
Cargo.toml |
Rust + Cargo | debian:bookworm-slim (multi-stage) |
go.mod |
Go modules | scratch (multi-stage, static binary) |
name: ocrtranslate
command: python run.py images --batch
port: 5000
env:
OLLAMA_HOST: http://host.docker.internal:11434
volumes:
- ./images:/app/images
- ./outputs:/app/outputs
depends_on:
- ollamaIf depends_on is set, DeployBox generates a docker-compose.yml wiring services together instead of a bare docker run.
Requires Go 1.23+ and Docker.
go build -o deploybox .
./deploybox init # generate Dockerfile for current directory
./deploybox up # build + start
./deploybox logs -f # tail container output
./deploybox down # stop + clean upThe tool scans for a single known filename per stack and generates the Dockerfile immediately. No wizard, no prompts, no config required. If you have pom.xml or requirements.txt, you have a Dockerfile.
Every generated Dockerfile uses Docker's layer caching — dependencies are copied and installed before source code, so rebuilds after code changes skip the entire dependency resolution step.
Containers can reach services running on the host machine (Ollama, databases, etc.) through Docker Desktop's built-in DNS name — no network gymnastics.
All generated Dockerfiles follow the same conventions: slim base images, single WORKDIR /app, non-root users where possible. If you use DeployBox on three different projects, you get three structurally identical Dockerfiles — audit once, trust all.
- OCR Translate (Python) — detected
requirements.txt, built image, ranpython run.py images --batch, connected to Windows Ollama viahost.docker.internal, produced translated output - MouseFlow Tracker (Java/Maven) — detected
pom.xml, built multi-stage image, resolved JNA + JavaFX + JNativeHook dependencies, compiled 4 source files, produced JAR