Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templatization of Dockerfile #40

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Templatization of Dockerfile #40

wants to merge 2 commits into from

Conversation

AbcSxyZ
Copy link
Contributor

@AbcSxyZ AbcSxyZ commented Dec 11, 2021

Here is a first suggestion for a templating mechanism to generate images files. It introduces a manifest/version file to manage all versions/distros/versions/hashes. It's not defined how the manifest should be designed, it's a discussion base.

I used a built-in python Template system to use a variable with % delimiter in the Dockerfile to dynamically change it with python variables, it enables regular Dockerfile variable with $ and template variable with %.

About alpine & potentially other bases, a lot may evolve, I tried to figure out some components which may change to update it when things evolve. load_template may select different base according to a variant/distro for example, variables for templates are set in 3 lines and with release_files, which may be updated depending on manifest evolution.

I followed the behavior of openjdk apply-templates.sh which delete and recreate all files. Their template script vary, the current script is pretty dumb and do not provide option, behavior to discuss too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant