Open
Description
Describe the bug
We are using custom aspnet-runtime-images with OCI manifest. When using dotnet publish -p:PublishProfile=DefaultContainer
with csproj's ContainerBaseImage
pointing to our custom image, publish fails (exception below).
Our OCI manifest does not have a mediaType
property in root which is valid according to the spec but seems to cause dotnet to fail:
{
"schemaVersion": 2,
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"size": ...,
"digest": "..."
},
"layers": [
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
...
To Reproduce
- create custom base image with OCI manifest
- create minimal dotnet web project with
ContainerBaseImage
- run
dotnet publish -p:PublishProfile=DefaultContainer
Exceptions (if any)
The "CreateNewImage" task failed unexpectedly. [...]
/usr/lib/dotnet/sdk/8.0.104/Containers/build/Microsoft.NET.Build.Containers.targets(202,5): error MSB4018: System.Text.Json.JsonException: JSON deserialization for type 'Microsoft.NET.Build.Containers.ManifestV2' was missing required properties, including the following: mediaType