Earlier quoted context omitted.
I feel dumber after using reddit
The same is usually said about watching Spongebob Squarepants, but YMMV. :)
Dockerfmt: A Dockerfile Formatter
51–60 of 67 posts
Re: Dockerfmt: A Dockerfile Formatter
#52I'd love to indent the body of each stage in multi-stage dockerfiles, like: FROM foo ... FROM bar ... It's easy to see at glance what's going on.
I personally don’t find this particularly helpful but can see it helping some folks. You write enough dockerfiles, the formatting becomes irrelevant.
What pisses me off though is _inconsistency_. One code base uses "formatting practices 1b", then another code base uses "formatting practices 2x". Then the worst offender: a service owners that can’t make up their mind and each developer makes up their own "best practices".
[1] https://stackoverflow.com/questions/272210/sql-statement-ind...
Re: Dockerfmt: A Dockerfile Formatter
#53I wish projects would adopt/create their own formatters like go and rust.
The amount of time I have wasted discussing "best practices" with "senior" engineers is way too damn high.
In code bases such as go or rust, the discussion ends with the "the built in formatter and preferences is preferred"
Re: Dockerfmt: A Dockerfile Formatter
#54waaaat? https://github.com/reteps/dockerfmt#:~:text=The%20RUN%20pars... I am firmly in the camp of RUN set -e ;\ export DEBIAN_FRONTEND=noninteractive ;\ etc etc so I guess this tool isn't for me
Is there any reason you prefer `set -e` over `&&`? I'm curious if this is a readability thing.
I also have a hard time reasoning about && with anything other than the most braindead sequence of commands because: $(thing && if other_thing; then inner_thing1 && thing2; fi && ohgawd)
And I just realized while typing that out that if its parser doesn't support ; then I guess one needs to
RUN if conditional_thing \
then good_luck && \
fi && \
echo "whew"Re: Dockerfmt: A Dockerfile Formatter
#55Who formats the formatter configs?
Re: Dockerfmt: A Dockerfile Formatter
#56Then we’ll need a formatter formatter.
Software is like onions said Shrek to Donkey.
Re: Dockerfmt: A Dockerfile Formatter
#57I 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
#58Re: Dockerfmt: A Dockerfile Formatter
#59You aren’t a real software engineer if your project doesn’t have 50 dot files in the root for your formatters, package mangers, linters, and ci. Who formats the formatter configs?
Other formatters of course since the configs are often yaml, toml, ini or json.
Re: Dockerfmt: A Dockerfile Formatter
#60Earlier quoted context omitted.
Is there any reason you prefer `set -e` over `&&`? I'm curious if this is a readability thing.
Readability is putting it mildly; do you write your shell scripts using that && style? No? Why not, is it for readability? I also have a hard time reasoning about && with anything other than the most braindead sequence of commands because: $(thing && if other_thing; then inner_thing1 && thing2; fi && ohgawd) And I just realized while typing that out that if its parser doesn't support ; then I guess one needs to RUN i…