Generate (template) Dockerfiles from one source for maintainability #4181

Closed
opened 2026-03-07 19:32:27 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @ypid on GitHub (Dec 28, 2019).

Hi,

because of #784 I would now need to update all Dockerfiles. Do I miss something or are you really making changes to all of them manually? May I suggest a trick like I used for Hashbang OS:

https://github.com/hashbang/aosp-build/blob/master/config/container/Dockerfile
https://github.com/hashbang/aosp-build/blob/master/config/container/render_template

Originally created by @ypid on GitHub (Dec 28, 2019). Hi, because of #784 I would now need to update all Dockerfiles. Do I miss something or are you really making changes to all of them manually? May I suggest a trick like I used for Hashbang OS: https://github.com/hashbang/aosp-build/blob/master/config/container/Dockerfile https://github.com/hashbang/aosp-build/blob/master/config/container/render_template
Author
Owner

@dani-garcia commented on GitHub (Dec 28, 2019):

At the moment all changes are made by hand, but you are right, it might not be a bad idea to use a template for each architecture, because the [sqlite, mysql, postgres] selection is basically the same outside dependencies and the cargo features.

It might be harder to do it between architectures, as the changes are bigger there, but then again maybe just unifying the database selection is good enough.

Your example sounds good, with one small detail: we'd have to store both the template and the rendered output in the repo to make docker hub work.

@dani-garcia commented on GitHub (Dec 28, 2019): At the moment all changes are made by hand, but you are right, it might not be a bad idea to use a template for each architecture, because the [sqlite, mysql, postgres] selection is basically the same outside dependencies and the cargo features. It might be harder to do it between architectures, as the changes are bigger there, but then again maybe just unifying the database selection is good enough. Your example sounds good, with one small detail: we'd have to store both the template and the rendered output in the repo to make docker hub work.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#4181