News for hackers. Stuff that matters.
Re:Dockerfmt: A Dockerfile Formatter by jensenbox on Tuesday April 08, 2025 @11:04PM (#43628523)
I had a chuckle when I looked at the source code and could not find a Dockerfile in there. I want to kick the tires on it and the easiest way would be to run it as a Docker container against an existing file and alas, I cannot.
Re:Dockerfmt: A Dockerfile Formatter by klysm on Tuesday April 08, 2025 @11:35PM (#43628668)
The project should certainly also be formatting its own docker file via a docker invocation
Re:Dockerfmt: A Dockerfile Formatter by thedougd on Tuesday April 08, 2025 @11:39PM (#43628692)
And built in a multistage Dockerfile.
Re:Dockerfmt: A Dockerfile Formatter by spicypete on Tuesday April 08, 2025 @11:35PM (#43628669)
Hi there — I’ll try to distribute a docker release of the binary tomorrow!
Re:Dockerfmt: A Dockerfile Formatter by ithkuil on Wednesday April 09, 2025 @01:51AM (#43629267)
I suggest you build it with https://github.com/ko-build/ko

so you can still have no dockerfile and the irony is not ruined

Re:Dockerfmt: A Dockerfile Formatter by IshKebab on Wednesday April 09, 2025 @03:29AM (#43629711)
I think they were asking for a sample Dockerfile in the repo to test it on.
Re:Dockerfmt: A Dockerfile Formatter by spicypete on Wednesday April 09, 2025 @01:44PM (#43634999)
Then they can use one of the 14 in the `tests` directory :) https://github.com/reteps/dockerfmt/tree/main/tests
Re:Dockerfmt: A Dockerfile Formatter by PhilippGille on Wednesday April 09, 2025 @02:21AM (#43629414)
> the easiest way would be to run it as a Docker container

Regarding this part, you can always just run a base image and add the app yourself. I'm on mobile so can't test, but should be along these lines:

    docker run --rm --name dockerfmt \
    -v /path/to/Dockerfile:/tmp/Dockerfile \
    golang:1.24-alpine sh -c \
    "apk add git && go run github.com/reteps/dockerfmt@latest /tmp/Dockerfile"
> against an existing file

For this part yes, you'd still need one, but it can be any of your own.

Re:Dockerfmt: A Dockerfile Formatter by revskill on Wednesday April 09, 2025 @06:55AM (#43630771)
The author doesn't know how to use AI.
Re:Dockerfmt: A Dockerfile Formatter by krick on Wednesday April 09, 2025 @10:17AM (#43632435)
I usually share the sentiment, but, come on, it's packaged as a single binary file...