dotnet / docker-tools

This is a repo to house some common tools for our various docker repos.
MIT License
122 stars 46 forks source link

Align ImageBuilder image platform validation with containerd #1161

Closed lbussell closed 1 year ago

lbussell commented 1 year ago

There is a bug in the Docker legacy builder that results in arm64 images being produced with the arm64/v8 variant. When switching to BuildKit, the arm64/v8 platform gets normalized to arm64 with no variant due to this code in containerd.

Currently, ImageBuilder checks the variant here, but doesn't take into account that arm64 and arm64/v8 are supposedly compatible: https://github.com/dotnet/docker-tools/blob/1bc4ea539f067c09d19627ca16ec9fcc38b240b5/src/Microsoft.DotNet.ImageBuilder/src/Commands/BuildCommand.cs#L412-L437

See https://github.com/moby/buildkit/issues/4039 for more details.

This is blocking https://github.com/dotnet/docker-tools/issues/1159

dotnet-issue-labeler[bot] commented 1 year ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.