Agentic developer tooling · Open source

The AI Dockerfile generator that containerizes any GitHub repo

Point Auto-Dock It at a public repository. It detects the stack, writes a production-grade Dockerfile, runs the build, and self-heals build and runtime errors until your container responds — all driven by an LLM.

or run the full self-healing loop in GitHub Codespaces
  • MIT licensed
  • Python 3.10+
  • 112 tests passing
  • ruff + bandit clean
  • Free-tier friendly
Auto-Dock It dashboard generating a production-grade Dockerfile for a GitHub repository, showing the Containerize, Explain and Improve tabs
How it works

Five stages, every one auditable

Each stage writes to disk, so an entire run is reproducible — from the shallow clone to the final HTTP check. Build and validate loop back through the LLM when something fails.

  1. 01

    Ingest

    Shallow-clones the repo (depth 1, 200 MB cap). Validates the URL against github.com before any network call.

  2. 02

    Analyze

    Reads manifests, tree, README and entrypoints, then asks the LLM for a structured RepoProfile. Cached per commit SHA.

  3. 03

    Generate

    Writes a production-grade Dockerfile from the profile — plus a docker-compose.yml when multiple services are detected.

  4. 04

    Build

    self-heal

    Runs docker build. On failure the error is sent back to the LLM, which returns a patch; the build retries (up to 4 times).

  5. 05

    Validate

    Starts the container and polls the exposed port for HTTP 2xx/3xx. Bad logs trigger up to two runtime-repair cycles.

every artifact → output/<run_id>/ (attempts/, usage.json, validation.txt)

The differentiator

It doesn't just generate — it self-heals

One-shot tools hand you a Dockerfile and wish you luck. Auto-Dock It runs a closed observe → decide → act loop: it reads the failure, patches, and retries until the container actually responds.

Build self-healing

Up to 4 retries

Trigger:
docker build exits non-zero

The truncated build error and the current Dockerfile go back to the LLM, which returns a patch. The build is retried until it succeeds or the budget runs out.

broken-flask: the LLM sed-patched a flsk typo in requirements.txt at build time.

Runtime repair

Up to 2 cycles

Trigger:
container starts but the app never responds

Container logs are fed back to the LLM, which diagnoses why the app failed to come up and patches the Dockerfile accordingly.

runtime-loop-fired: the LLM read a FileNotFoundError and added apt-get install -y pandoc.

Both loops in one run: in jenkins-demo, the runtime loop patched a bind-port mismatch (Flask on 8501, EXPOSE said 8000), the inner build loop fixed a USER-ordering bug the first repair introduced, and the second build came back HTTP 200.

Features

Everything you need to dockerize with confidence

From multi-service Compose generation to a full audit trail of every repair attempt — Auto-Dock It is built for real, messy repositories.

Self-healing build loop

Failed docker build output is fed back to the LLM for an automated patch and retry — non-standard repos included.

Runtime-repair loop

If the container starts but the app doesn't respond, container logs drive a second LLM repair cycle.

Docker Compose support

Auto-generates docker-compose.yml for multi-service repos, with host-port discovery via docker compose port.

Bring your own key

Paste a Gemini or Groq key in the UI to use your own quota and bypass shared rate limits.

Full audit trail

Every attempt, the error that triggered the repair, and the patch are saved under output/<run_id>/attempts/.

Explain & Improve

Get a line-by-line walkthrough of any Dockerfile and prioritised improvement suggestions with diffs.

PR back to upstream

After a successful run, autodock pr forks the repo and opens a pull request with the generated artifacts.

Security-hardened

Symlink traversal guards, Dockerfile and Compose safety scans, prompt-injection guards, optional no-network builds.

Compare

How it stacks up against the alternatives

Nixpacks, Buildpacks and repo2docker automate the happy path. Auto-Dock It keeps going when the build breaks.

Capability comparison between Nixpacks, Buildpacks, repo2docker, a one-shot LLM, and Auto-Dock It.
CapabilityNixpacksBuildpacksrepo2dockerOne-shot LLMAuto-Dock It
Handles unusual / non-standard reposPartialPartialNoPartialYes
Self-heals build errorsNoNoNoNoYes
Self-heals runtime errorsNoNoNoNoYes
Multi-service (Docker Compose)NoNoNoPartialYes
Full audit trail of every attemptNoNoNoNoYes
Bring-your-own LLM key (BYOK)n/an/an/an/aYes
Open sourceYesYesYesn/aYes
See it in action

A clean black-and-white interface, in your theme

Live captures of the deployed web UI. The shots follow your theme — light when you read in light mode, dark when you read in dark.

Auto-Dock It landing page with the Containerize, Explain and Improve tabs and a GitHub repository URL input
Landing & Containerize tab
Auto-Dock It with a Flask sample repository selected and the URL validated, ready to containerize
Sample repo populated
Auto-Dock It Explain tab giving a line-by-line walkthrough of a generated Dockerfile
Explain any Dockerfile
Receipts

Nine real runs, captured end to end

Each demo folder ships every attempted Dockerfile, the build error, the LLM's repair, and the final HTTP validation — proof the self-healing loop fires on real failures.

jenkins-demo

200

Flask; bind-port mismatch (8501 vs EXPOSE 8000)

Self-healing:
1 build + 2 repairs (1 nested)

HTTP 200 — sed patched port, inner loop fixed USER ordering

flask

200

Python + Flask + gunicorn

Self-healing:
1 build repair

HTTP 200

nodejs

200

Node + Express

Self-healing:
1 build repair

HTTP 200

broken-flask

200

Flask with a flsk typo in requirements.txt

Self-healing:
3 build repairs

HTTP 200 — LLM sed-patched the typo at build time

flask-redis

200

Flask + Redis multi-service

Self-healing:
None needed

HTTP 200 — auto-generated docker-compose.yml

flask-postgres

200

Flask + Postgres with psycopg

Self-healing:
None needed

HTTP 200 — compose with postgres:16 sidecar

env-required-flask

200

Flask requiring an undeclared env var

Self-healing:
1 build repair

HTTP 200 — grep found REQUIRED_SECRET, LLM added ENV

crashing-route-flask

200

Flask route reading a hardcoded /etc path

Self-healing:
None needed

HTTP 200 — LLM spotted the path, added RUN mkdir

runtime-loop-fired

200

Flask shelling out to pandoc

Self-healing:
1 build + 1 runtime repair

HTTP 200 — LLM read FileNotFoundError, added apt-get install pandoc

Testing evidence

Built to be trusted, not just demoed

A real test suite, clean lint and security scans, and a CI matrix across four Python versions — with nine recorded runs as integration evidence.

0 passing

Unit & integration tests

in under 3 seconds

Clean

Lint

ruff check

Clean

Static security

bandit -r

0 recorded

Captured demo runs

with full attempt history

0.10 – 3.13

Python matrix

GitHub Actions CI

Recorded

Nested self-heal

jenkins-demo run

FAQ

Questions, answered

The things people ask before pointing it at their first repository.

  • Give Auto-Dock It a public GitHub URL. It shallow-clones the repo, uses an LLM to detect the stack from manifests and source, writes a production-grade Dockerfile, runs the build, and self-heals errors until the container responds — no manual Dockerfile writing required.

  • Nixpacks and Buildpacks automate only the happy path. Auto-Dock It runs an agentic loop: when a build or runtime fails, the error is fed back to the LLM, which patches the Dockerfile and retries. It handles non-standard repos, multi-service Docker Compose setups, and keeps a full audit trail of every attempt.

  • Yes. Auto-Dock It is MIT-licensed and open source. It works with free-tier LLM keys from Google Gemini or Groq, and you can bring your own key (BYOK) to bypass shared rate limits.

  • The analyzer reads manifests and source for Python, Node.js, Go, Java, Ruby, and PHP, including package.json, requirements.txt, pom.xml and more. Because generation is LLM-driven, it adapts to non-standard project layouts too.

  • Yes. When multiple services are detected, Auto-Dock It also generates a docker-compose.yml and discovers host ports via docker compose port — for example a Flask app with a Postgres or Redis sidecar.

  • If docker build fails, the truncated error and the current Dockerfile are sent back to the LLM, which returns a patch; the build is retried (up to four times by default). A second runtime-repair loop feeds container logs back to the LLM if the app starts but does not respond.

  • Auto-Dock It includes symlink path-traversal protection, an LLM-output Dockerfile and Compose safety scanner, prompt-injection guards, multi-user key isolation, and an optional network-isolated build mode. Still, building any repo runs its code, so prefer trusted sources or a throwaway environment.

  • Yes. There is a Typer-based CLI (autodock run, explain, improve, pr, list, doctor) and a Streamlit web UI with live log streaming. The hosted demo runs in preview mode; run locally or in a Codespace for the full self-healing loop.

Containerize your next repo in minutes

Try the hosted demo, or spin up the full self-healing pipeline in a free GitHub Codespace. No credit card, free-tier LLM keys welcome.