Allow users to set a specific ContainerImageFormat to force OCI support#46011
Merged
baronfel merged 4 commits intodotnet:mainfrom Jan 20, 2025
Merged
Conversation
This was referenced Jan 16, 2025
surayya-MS
reviewed
Jan 16, 2025
Member
surayya-MS
left a comment
There was a problem hiding this comment.
Looks good to me! waiting for tests
Member
Author
|
Ok, added a test! |
This was referenced Jan 18, 2025
surayya-MS
approved these changes
Jan 20, 2025
Member
Author
|
/backport to release/8.0.4xx |
Member
Author
|
/backport to release/9.0.1xx |
Contributor
|
Started backporting to release/8.0.4xx: https://github.com/dotnet/sdk/actions/runs/12872249580 |
Contributor
|
Started backporting to release/9.0.1xx: https://github.com/dotnet/sdk/actions/runs/12872251500 |
Contributor
|
@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 128Please backport manually! |
Contributor
|
@baronfel an error occurred while backporting to "release/9.0.1xx", please check the run log for details! Server Error |
Member
Author
|
Backporting to 8.x and 9.x because this is requested by an internal team that has this constraint. |
baronfel
added a commit
to baronfel/sdk
that referenced
this pull request
Jan 20, 2025
baronfel
added a commit
to baronfel/sdk
that referenced
this pull request
Jan 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes dotnet/sdk-container-builds#611
This introduces a new MSBuild property,
ContainerImageFormat, which can be one ofOCIorDocker. 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:2instanceTodo: