Work

DockerizeItArchived

A CLI that looks at a project folder and writes the Dockerfile for it. Two stacks, then I stopped.

C Sarath Babu's experiment DockerizeIt, a Dockerfile generator. Three grey rectangles, one stamped in navy ink, and one left un-stamped

I wrote a small tool in Go that looks at a project folder and writes the Dockerfile.

./dockerize-it -path /path/to/your/project

It reads what is there, works out the stack, and generates a Dockerfile and a docker-compose.yml.

Why

I kept writing the same Dockerfile.

A Node project has a package.json, needs a base image, an install step and a start command. A Go project has a go.mod and wants a build stage and a small final image. Neither is hard. Both are tedious to type again every time, and I was copying them between repositories and editing the names.

Anything you copy and edit is something a tool should do.

Where it stopped

Node and Go. That is all it ever supported.

I built those two because they were the ones I was using, and then I stopped needing it, and adding Python and Rust never became more interesting than the work it would have unblocked.

The last commit is two years old.

What it was worth

The idea holds up. Detecting a stack from its files is not hard, and generating a reasonable Dockerfile from that is not hard either.

What I underestimated was how quickly "reasonable" stops being enough. A real Dockerfile ends up carrying build caching, a non-root user, multi-stage layers and whatever the deployment target needs. A generated one gets you the first draft, and then you edit it, which is what I was doing anyway.

Not a failure. It did the thing I built it for. It just did not keep earning its place.

tl;dr

Point it at a folder, get a Dockerfile. Node and Go only, and no longer maintained.

Source on GitHub