-
Notifications
You must be signed in to change notification settings - Fork 103
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
Consider utilizing parameterized Dockerfiles as a means to reduce duplication #231
Comments
First of all, my +1 for proposing to DRY stuff in this repo, it is getting baggy by day, and I think it is possible to accomplish true DRY'ness while maintaining the tidiness/readability. After experimented a few approaches in CI runs of recent PRs and seeing what is and isn't possible/supported, I have a few ideas that I'd like to share, which I believe would scale with a few moving parts. Here are my 2 cents... There are two kinds of duplicates which I think worth pursuing:
|
Note that our infrastructure does now have support for Dockerfile templates and are being used by the dotnet/dotnet-docker and microsoft/dotnet-framework-docker repos. See documentation and example template. |
Great! I can attempt to convert Alpine 3.13 and 3.14 to use the templates and DRY out the repetitions. I presume Alpine 3.12 and below can probably be deleted, based on https://github.com/dotnet/core/blob/main/release-notes/6.0/supported-os.md#linux; that .NET 6 only supports Alpine 3.13+? |
Investigate whether or not utilizing parameterized Dockerfiles would reduce the amount of duplication and ease the maintenance cost of the Dockerfiles. It may help increase the developer productivity.
An example of this would be to parameterize the Alpine base image tag within the Alpine Helix Dockerfiles. The base image tag appears to be the only thing different between the various versions
alpine 3.11 amd64 vs alpine 3.10 amd64
The FROM image argument value can be specified within the manifest.
The text was updated successfully, but these errors were encountered: