dotnet / dotnet/dotnet-docker

Editing the `manifest.json` file by hand is time-consuming and error-prone

Open
#4,704 4 comments 0 reactions 0 assignees View on GitHub
area-infrastructure SFI
Dominant language
Dockerfile
Stars
4.9k
Forks
2k
Avg merge
1d 14h
Merged PRs (30d)
26

Description

### Describe the Problem

.NET Docker's [manifest.json](https://github.com/dotnet/dotnet-docker/blob/29e24e469b7a1b9ce538ae95022b82be06b0f3fc/manifest.json) is over 7000 lines long and can only be edited by hand. This is an extremely time-consuming and error-prone process that needs to happen every time we move or update floating tags, and add or remove linux distros.

Additionally, there is lots of duplication of the same information inside and outside of the manifest file. For example,

https://github.com/dotnet/dotnet-docker/blob/5b22241344ad14c15c7dcd1116d33b1eb3d76350/manifest.json#L965-L1009

The .NET version, architecture, and operating system are repeated constantly throughout this snippet. The tags are plaintext except for the product version variables - while this is nice for flexibility we always update them based on a pattern. It is very easy to get wrong, see:
- https://github.com/dotnet/dotnet-docker/issues/4634
- https://github.com/dotnet/dotnet-docker/issues/4060
- https://github.com/dotnet/dotnet-docker/issues/2307

There are many more instances caught in code review.

### Describe the Solution

The intention of this issue is to start a discussion on how we can improve the situation.

I have thought of a few potential solutions:
- Generate dotnet-docker's `mainfest.json` using a template.
- This allows us the same amount of flexibility that we already have by operating in plain-text, and also leaves other repos alone (.NET Fx, buildtools-prereqs).
- Create a tool or new command in ImageBuilder that can operate on the manifest.json.
- Simplify the `manifest.json` schema.
- As far as I'm aware, the `manifest.json` schema has not changed dramatically since it was created many years ago. This could allow us to re-think many aspects of the repo and take advantage of `buildx`/`buildkit`/multi-arch Dockerfiles/whatever new Docker features exist today.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.