#rtfm

monkeymind@pod.geraspora.de

Argh! Hipsters and their Dockerfiles!!!!

Who is responsible for teaching the current crop of attention-deficit teenagers that command sequences in Unix shells (like bash) are separated by '&&'? Would this person please own up? I have an axe to grind...

So recently, we had Yet Another Java Fuckup, this time because everybody was surprised that Java will load and link random libraries form the internet when told to do so... yes, that log4j hilarity. We all had a good laugh.

Now, I'm having to clean up behind some half-assed attempt at mitigating for log4j, in the form of the following Dockerfile:

apt update && apt -y install -t bullseye-backports libreoffice && rm  /usr/share/java/ant-apache-log4j-1.10.9.jar && rm /usr/share/maven-repo/org/apache/ant/ant-apache-log4j/1.10.9/ant-apache-log4j-1.10.9.jar

You know the more I look, the more idiotic this is. First of all, if you don't understand shell programming, go read the fucking manual. Second of all, don't copy-paste cargo cult code form the internet, especially if you don't understand what it does. Third of all, don't use the && operator if you just want to have a sequence of commands on a single line. Fourth of all, if you insist on using the && conditional execution operator (yes, it really means, "short-circuit AND depending on the return code of the previous command", i.e. "cmd1 && cmd2" is equivalent to "if cmd1; then cmd2; fi", just like it does in C and presumably the current hip scripting language everybody thinks is awesome), then please, please also read the manpage for "rm": you could have used the '-f' option, pointlessly, to at least make this && nonsense *work and not fail if the package you installed no longer contains log4j jarfiles.

I mean, it is even more work to type && than ; and the latter actually does what you think it should do.

You know... argh! Headdesk! Hate!!! Bile!!11!!1! Can someone PLEASE make a Youtube tutorial or Stack Overflow topic or TicToc bloop on how to use the semicolon operator in Bash. Because, obviously, today's crop of "programmers" (and I use this word in the most loose, general sense possible) can not read any more. least of all, manuals. But I'm sure they love TicToc. Their "code" looks like they do.

Please go back to playing candy crush, or whatever it is kids these days play. Don't ship "code" you don't understand. Don't "code" at all. Go away.

#rant #docker #RTFM #hipsters #attentionDeficitTeenagers #log4j #hate