-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow users to set a specific ContainerImageFormat to force OCI support #46011
Allow users to set a specific ContainerImageFormat to force OCI support #46011
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! waiting for tests
Ok, added a test! |
/backport to release/8.0.4xx |
/backport to release/9.0.1xx |
Started backporting to release/8.0.4xx: https://github.com/dotnet/sdk/actions/runs/12872249580 |
Started backporting to release/9.0.1xx: https://github.com/dotnet/sdk/actions/runs/12872251500 |
@baronfel backporting to "release/8.0.4xx" failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: allow users to set a specific ContainerImageFormat to force OCI support
Using index info to reconstruct a base tree...
M src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs
M src/Containers/Microsoft.NET.Build.Containers/ImageBuilder.cs
A src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net10.0/PublicAPI.Unshipped.txt
M src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net472/PublicAPI.Unshipped.txt
M src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.Interface.cs
M src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs
M src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImageToolTask.cs
M src/Containers/containerize/ContainerizeCommand.cs
M src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets
Falling back to patching base and 3-way merge...
Auto-merging src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets
CONFLICT (content): Merge conflict in src/Containers/packaging/build/Microsoft.NET.Build.Containers.targets
Auto-merging src/Containers/containerize/ContainerizeCommand.cs
CONFLICT (content): Merge conflict in src/Containers/containerize/ContainerizeCommand.cs
Auto-merging src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImageToolTask.cs
Auto-merging src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs
Auto-merging src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.Interface.cs
Auto-merging src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net8.0/PublicAPI.Unshipped.txt
Auto-merging src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net472/PublicAPI.Unshipped.txt
Auto-merging src/Containers/Microsoft.NET.Build.Containers/ImageBuilder.cs
Auto-merging src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 allow users to set a specific ContainerImageFormat to force OCI support
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@baronfel an error occurred while backporting to "release/9.0.1xx", please check the run log for details! Server Error |
Backporting to 8.x and 9.x because this is requested by an internal team that has this constraint. |
Fixes dotnet/sdk-container-builds#611
This introduces a new MSBuild property,
ContainerImageFormat
, which can be one ofOCI
orDocker
. If present, this will force single image manifests and configuration to use the format specified. If unset, the formats of the base image will be used.I was able to test this locally and verify all of the expected media types on a locally-running
registry:2
instanceTodo: