← All posts

New free tool: AI Dockerfile Generator from any public repo

Paste a public repo URL and get a production-ready Dockerfile in seconds. Multi-stage builds, pinned versions, non-root user — all inferred from the actual source code. Works on 250+ languages and frameworks.

· Alex Sofroniev· 4 min read· docker, devops, developer tools, ai, containerization

Every time a team says "we'll Dockerize it later," that later never comes. The blocker is rarely Docker itself — it's deciding on the right base image, build steps, exposed port, and runtime command for a codebase you don't fully remember. Today we're shipping a tool that removes that blocker entirely.

ShipDocs' AI Dockerfile Generator reads any public GitHub, GitLab, or Bitbucket repo and writes a production-ready Dockerfile from the actual source. It detects the language from package.json, go.mod, Cargo.toml, requirements.txt, and 250+ other manifest files, then builds the right multi-stage image with pinned versions, proper layer caching, and a non-root user when possible. No more FROM ubuntu + apt-get install copy-pasta.

What it does

Paste a repo URL at shipdocs.sh/tools/dockerfile and you get:

  • Detected runtime — Node 20-alpine, Python 3.12-slim, Go 1.22, Rust 1.75, or whatever the manifest says.
  • Multi-stage build — compile in one layer, ship only the binary in a second. No build tools in the final image.
  • Pinned base image versions — node:20-alpine, not node:alpine. Reproducible builds, no surprise breakages.
  • Correct build commands — npm ci, go build, cargo build --release, pip install -r requirements.txt — inferred from the actual manifest, not guessed.
  • Sensible EXPOSE — detects the port from the entry point or a config file when possible.
  • Non-root USER — runs as an unprivileged user in the final stage when the runtime supports it.
  • Comments — every non-obvious choice is explained inline so you can tweak it.

Try it on these repos

RepoWhy it's interesting
github.com/vercel/next.jsComplex monorepo with Turbopack, TypeScript, multiple build targets
github.com/kubernetes/kubernetesMulti-language, custom build scripts, Go modules
github.com/supabase/supabaseDocker Compose already present — see how the tool handles existing infra
github.com/t3-oss/create-t3-appModern TypeScript stack with Prisma, tRPC, Next.js

Just paste the URL and hit Generate. No signup, no API key, no credit card. The tool is rate-limited to 5 runs per IP per 10 minutes to keep costs sane.

How it works under the hood

The Dockerfile Generator uses the same repo indexer that powers ShipDocs' documentation engine:

  1. Clone the repo via isomorphic-git (public repos only for the free tool).
  2. Filter to source + manifest files — code, configs, build scripts.
  3. Prioritize the most informative files: the README, root manifest (package.json, go.mod, etc.), entry points (main.go, app.py, index.ts), and a sample of the actual source.
  4. Send to an LLM with a system prompt that says "you are a senior DevOps engineer writing a Dockerfile. Ground every choice in the source shown to you."
  5. Return the raw Dockerfile text with no markdown wrapper so you can copy-paste it directly.

The model is Llama 3.1 8B via OpenRouter on the free tier — fast, cheap, and good enough for Dockerfile inference on most stacks. Paid ShipDocs users get the same tool on Claude Sonnet for private repos.

Private repos too

If you connect a private repo to ShipDocs (Starter plan and up), the Dockerfile Generator shows up as a button inside your project's docs page. It reads the already-indexed source files — no re-clone needed — and uses Claude Sonnet instead of Llama for higher-quality output on complex monorepos.

Limitations

Dockerfile generation is not magic. The tool works best when:

  • The repo has a recognizable manifest file (package.json, go.mod, Cargo.toml, pyproject.toml, requirements.txt, pom.xml, etc.)
  • The entry point is in a standard location or named conventionally (main.go, app.py, server.ts, etc.)
  • The build process is documented in the README or the manifest scripts

It will struggle with:

  • Projects that require complex external build pipelines (Bazel monorepos with custom rules, for example)
  • Projects with heavy native dependencies that need system libraries not available in Alpine
  • Highly unusual directory layouts with no manifest at all

In those cases, the generated Dockerfile is still a useful starting point — but you'll need to hand-tune it.

What's next

The Dockerfile Generator is the fourth free tool on ShipDocs, joining the README Generator, Complexity Score, and Explain-in-a-Tweet. The fifth — a Production Readiness Audit that scores any repo on docs, CI, tests, secrets hygiene, and dependency health — ships next week.

Try the Dockerfile Generator now:

→ shipdocs.sh

No signup required. Paste a repo URL, get a Dockerfile.

What does this article answer?

Paste a public repo URL and get a production-ready Dockerfile in seconds. Multi-stage builds, pinned versions, non-root user — all inferred from the actual source code. Works on 250+ languages and frameworks.

Who should read it?

Engineers, tech leads and documentation owners dealing with docker, devops, developer tools. It is written for teams that maintain private repositories and need documentation that stays current.

Can I try this on my own repository?

Yes. Run a free analysis tool on a public repo with no account, or start the 3-day free Advanced trial on a private one and keep the generated Markdown either way. Live examples of generated documentation show the output before you commit to anything.

What should I read next?