Merged
Conversation
0e20b3f to
773ed0b
Compare
773ed0b to
9ddb36e
Compare
9ddb36e to
724f566
Compare
jhrcek
approved these changes
Oct 2, 2025
Collaborator
jhrcek
left a comment
There was a problem hiding this comment.
Having some automation around this makes sense to me as long as we're keeping the generated dockerfiles in git. I don't see any immediate issues with this, so 👍 from me
Collaborator
Author
Yes, I could not agree more and that was the intent from the day 0. Let's merge and see how it works. |
|
Nice work! As a followup, maybe we could have a GitHub workflow that confirms that the generated Dockerfiles are in sync with the generator script. :) |
develop7
added a commit
to develop7/docker-haskell
that referenced
this pull request
Oct 7, 2025
develop7
added a commit
to develop7/docker-haskell
that referenced
this pull request
Oct 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces a Dockerfile generator in an attempt to finally eliminate the copy&paste.
The generator is essentially a program that feeds
template/Dockerfile.jinjatemplate (in the (in)famous Jinja syntax; powered by our own Ginger) with the data from YAML files scattered across the repository and prints aDockerfile. The choice of Jinja for templates and YAML for data is a middle ground between correctness and accessibility. GeneratedDockerfiles are supposed to be checked in to version control regardless, so it doesn't change much the workflow as a whole — it just makes updating images along almost trivial, eliminating the most tedious part of the maintainer's job.I also took the liberty to enhance the
Dockerfiletemplate slightly, in particular:RUNstanzas to heredoc syntax dropping these nasty\;trails on every lineENVstanzas so the build won't failThings to fix:
generate.shor something. @jhrcek @chreekat I'm open for suggestions.