dotnet / dotnet/dotnet-buildtools-prereqs-docker
Centrally define versions that can be used by multiple Dockerfiles
- Dominant language
- Dockerfile
- Stars
- 87
- Forks
- 118
- Avg merge
- 10h 26m
- Merged PRs (30d)
- 4
Description
There are many Dockerfiles in this repo that are all installing a specific version of some software asset. It's important that the referenced version is consistently referenced across all the Dockerfiles.
> [!NOTE]
> There may need to be some differences in the versions used between Dockerfiles for compatibility reasons based on the usage of those images.
Keeping these versions all in sync is a maintenance burden because it requires someone to have to search through all the Dockerfiles to understand which ones are affected and need to be updated. Having a centrally-defined location for these software versions would solve this problem.
Precedence for this approach already exists at https://github.com/dotnet/dotnet-docker ([MinGit example](https://github.com/dotnet/dotnet-docker/blob/f2d5a41a7462040322f69a01b7d33a23294f5a5d/manifest.versions.json#L121)). That repo uses an [update-dependencies tool](https://github.com/dotnet/dotnet-docker/tree/main/eng/update-dependencies) to keep a centrally-defined JSON file updated with references to versions. That version is then used as input for generating the Dockerfiles via [templates](https://github.com/dotnet/dotnet-docker/blob/main/CONTRIBUTING.md#editing-dockerfiles). Instead of templating the Dockerfiles, another solution may be to pass in the version value as an `ARG` (however, see https://github.com/dotnet/docker-tools/issues/1505).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.