1001Ferramentas
🐳Dev

Dockerfile Generator

Build a Dockerfile from common templates: Node, Python, Go, Static Nginx, with optional multi-stage, healthcheck and non-root user. Everything in your browser.

Build a Dockerfile from templates

Writing a Dockerfile from scratch forces you to recall the right base image, the layer order and the security best practices. This generator starts from already-tested templates for the most common stacks, Node, Python, Go and a static Nginx site, and builds the file in your place.

Every template already ships the practices that set a professional Dockerfile apart: running as a non-root user, dependencies installed before the source so layer caching works, and a lean base image. The control left to you is the multi-stage build, which shrinks the final image and applies to the Node template — Go is always two stages and Nginx always one.

Generation runs in the browser and the file comes out ready to copy into the project root. Instead of staring at a blank page, you begin from a solid starting point.

Frequently asked questions

Where do I switch the HEALTHCHECK on?
Nowhere: the page carries three controls only, the template, the base version and the multi-stage checkbox. None of the four generated Dockerfiles includes a HEALTHCHECK instruction, so add the line by hand if your orchestrator depends on it, something like HEALTHCHECK --interval=30s CMD wget -qO- http://localhost:3000/ || exit 1. Running as a non-root user, by contrast, is always on with no toggle: USER node in the Node template and an app user created in the Python and Go ones.
I unticked multi-stage and the Python Dockerfile stayed the same. Is that a bug?
That's how it behaves today: the multi-stage checkbox only affects the Node template. The Go one always comes out in two stages, compiling on the golang image and copying the binary into a lean alpine:3; the Python one is always single-stage, and so is the static Nginx site. Ticking or unticking the box with any template other than Node leaves the output untouched, line for line.
Does the base version apply to every template?
It applies to Node, Python and Go, though the value gets no validation and no reset when the template changes, which is where the trap sits. The field starts at 20, sensible for node:20-alpine; switch to Python without touching it and the output reads python:20-slim, an image that doesn't exist. Set it to 3.12 instead, or 1.22 for Go. The static site template ignores the field entirely: the image is always nginx:alpine.

Related Tools