[GH-ISSUE #785] Generate (template) Dockerfiles from one source for maintainability #543

Closed
opened 2026-03-03 01:30:22 +03:00 by kerem · 1 comment
Owner

Originally created by @ypid on GitHub (Dec 28, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/785

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). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/785 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
kerem closed this issue 2026-03-03 01:30:22 +03:00
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.

<!-- gh-comment-id:569442685 --> @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.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#543
No description provided.