Frank Shearar-3 wrote
I don't see how… Squeak could save you from that
install: packageCollection | cmdTemplate sortedPackages packageLines command comment | comment := '- Main reference: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#ru... - We chose to omit `--no-install-recommends` because the (small?) size difference didn''t seem to be worth the potential problems (see https://askubuntu.com/questions/65081/what-are-the-implications-of-no-instal...) - `-y` isn''t needed because it is implied in `-qq` (see https://askubuntu.com/questions/258219/how-do-i-make-apt-get-install-less-no...).'. cmdTemplate := 'apt-get -qq update && apt-get -qq install \ {packages} && rm -rf /var/lib/apt/lists/*'.
"Sort per https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#so..." sortedPackages := packageCollection sort. packageLines := String streamContents: [ :s | sortedPackages do: [ :e | s nextPutAll: e; nextPutAll: ' ' ] separatedBy: [ s lf; space; space; space; space ] ]. command := cmdTemplate format: { #packages -> packageLines } asDictionary. ^ self new command: command; comment: comment; yourself
You could say I just kicked the can down the road because the alphabetization problem still exists inside Smalltalk, but since it's turtles all the way down, if it really bothered me I could hack together a little GUI to edit the list!
----- Cheers, Sean -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html