Skip to content

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

Description

@lbussell

Describe the Problem

.NET Docker's 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,

dotnet-docker/manifest.json

Lines 965 to 1009 in 5b22241

"productVersion": "$(dotnet|8.0|product-version)",
"sharedTags": {
"$(dotnet|8.0|product-version)": {},
"$(dotnet|8.0|product-version)-bookworm-slim": {},
"8.0-preview": {},
"8.0-preview-bookworm-slim": {},
"latest": {}
},
"platforms": [
{
"dockerfile": "src/runtime-deps/8.0/bookworm-slim/amd64",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile",
"os": "linux",
"osVersion": "bookworm-slim",
"tags": {
"$(dotnet|8.0|product-version)-bookworm-slim-amd64": {},
"8.0-preview-bookworm-slim-amd64": {}
}
},
{
"architecture": "arm",
"dockerfile": "src/runtime-deps/8.0/bookworm-slim/arm32v7",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile",
"os": "linux",
"osVersion": "bookworm-slim",
"tags": {
"$(dotnet|8.0|product-version)-bookworm-slim-arm32v7": {},
"8.0-preview-bookworm-slim-arm32v7": {}
},
"variant": "v7"
},
{
"architecture": "arm64",
"dockerfile": "src/runtime-deps/8.0/bookworm-slim/arm64v8",
"dockerfileTemplate": "eng/dockerfile-templates/runtime-deps/Dockerfile",
"os": "linux",
"osVersion": "bookworm-slim",
"tags": {
"$(dotnet|8.0|product-version)-bookworm-slim-arm64v8": {},
"8.0-preview-bookworm-slim-arm64v8": {}
},
"variant": "v8"
}
]
},

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:

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.

Activity

  1. mthalman commented on Jun 28, 2023

    @mthalman
    Member
  2. mthalman commented on Jun 28, 2023

    @mthalman
    Member

    [Triage]

    We should pursue a low-cost design/POC that can be a solution here. The current manifest schema offers a lot of flexibility that we don't want to lose. Any new solution should be able to express those scenarios.

  3. moved this from Backlog to Current Release in .NET Dockeron Jun 28, 2023
  4. moved this from Current Release to Post-Release in .NET Dockeron Aug 16, 2023
  5. moved this from Post-Release to Current Release in .NET Dockeron Nov 16, 2023
  6. changed the title [-]Improve the editing experience for dotnet-docker's manifest[/-] [+]Editing the `manifest.json` file by hand is time-consuming and error-prone[/+] on May 6, 2024
  7. lbussell commented on May 6, 2024

    @lbussell
    MemberAuthor

    Edited the title to reflect the issue and not a potential solution.

    Also, solving #2316 might get us part-way to a solution here.

  8. moved this from Current Release to Post Release in .NET Dockeron Sep 16, 2024
  9. moved this from Post Release to Current Release in .NET Dockeron Nov 13, 2024
  10. added this to the .NET 10 Features milestone on Nov 13, 2024
  11. moved this from Current Release to Backlog in .NET Dockeron Jul 14, 2025
  12. added theissue type on Oct 20, 2025
  13. moved this from Backlog to Current Release in .NET Dockeron Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    • Status
      Current Release

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions