mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-19 05:12:01 -05:00
Generate (template) Dockerfiles from one source for maintainability #4181
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
@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.