-
-
Notifications
You must be signed in to change notification settings - Fork 911
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
allow to template dockerfile contents #4166
Comments
We have been using GoReleaser for building and releasing over 300 of our modules. It's been an exceptional tool in streamlining our CI/CD pipeline. Recently, we have encountered a challenge which we believe could be solved with an enhancement to GoReleaser. Currently, we use a single Dockerfile across all our modules, where the binary/service name is injected as an environment variable
However, we have started an initiative to use minimal, shell-less containers for improved security and resource optimization. This presents a challenge as the current mechanism of using environment variables for path interpolation will no longer work, leading us towards creating a unique Dockerfile for each service, which isn't very efficient. This feature would allow us to use template variables in the Dockerfile which would be replaced during the build process. A potential Dockerfile might look something like this:
|
that adds a lot of context, thanks for sharing @ryancurrah . I'll work on this soon 🙏 |
will be on next pro release :) PS: if you think of any more fields you'd need to template the contents, feel free to ping here or open more issues :) |
Thank you! |
refs https://github.com/orgs/goreleaser/discussions/3842#discussioncomment-6376551
The text was updated successfully, but these errors were encountered: