Open Tobias-08 opened 6 months ago
Thanks for the report.
@Tobias-08 without a media type, how should we interpret the various properties of the manifest? When an image like this is pushed to Docker hub or other container registries, what defaults do they have?
@baronfel Thanks for your quick response.
I'm not an expert on OCI manifests but shouldn't config:mediaType
or layers:n:mediaType
be sufficient?
Or do you mean that you need the root mediaType
to differentiate between docker and OCI manifests (without parsing further properties)? Then I get your point but in my opinion it's still problematic that a valid manifest does not work.
Yeah, your last point is what I was getting at. At this point I agree with you that per spec the manifest is valid, and I think that we need to see what other tools do in the absence of this (seemingly critical) information. Do they assume a certain media type? Do they probe for properties that only exist in one media type or another? Etc.
@Tobias-08 is there any chance you could provide a sample base image or link to one for testing purposes?
I think that Docker at least defaults a manifests' mediaType to "application/vnd.docker.distribution.manifest.v2+json"
, based on this default which is mapped to a mediaType in this check
@baronfel Unfortunately I am not allowed to share our images and I did not find a comparable OCI dotnet image.
I would have said to go with the "probe for properties that only exist in one media type"-approach.
That said I'm going to check with our image guys if the root mediaType
could be added (as it seems quite unusual not to have one).
Describe the bug
We are using custom aspnet-runtime-images with OCI manifest. When using
dotnet publish -p:PublishProfile=DefaultContainer
with csproj'sContainerBaseImage
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:To Reproduce
ContainerBaseImage
dotnet publish -p:PublishProfile=DefaultContainer
Exceptions (if any)