8000 Encoded plus sign in image mediaType for container publish · Issue #47399 · dotnet/sdk · GitHub
[go: up one dir, main page]

Skip to content
Encoded plus sign in image mediaType for container publish #47399
Open
@MattKotsenas

Description

@MattKotsenas

Describe the bug

It appears that special characters are getting encoded in the OCI manifests in some places. It's unclear if this has any practical impact, but I'm pretty sure it violates the OCI spec.

To Reproduce

  1. Install SDK 8.0.407 (or similar) to get the newest multi-arch container publishing
  2. Create a project like this:
<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>

  <PropertyGroup Label="Docker container">
    <EnableSdkContainerSupport>true</EnableSdkContainerSupport>
    <ContainerFamily>cbl-mariner2.0</ContainerFamily>
    <RuntimeIdentifiers>linux-x64;linux-arm64</RuntimeIdentifiers>
    <ContainerImageTag>$(TargetFramework)</ContainerImageTag>
    <ContainerArchiveOutputPath>$(RepoRoot)/artifacts/containers/</ContainerArchiveOutputPath>
    <ContainerImageFormat>OCI</ContainerImageFormat>
  </PropertyGroup>
</Project>
  1. dontet publish /t:PublishContainer
  2. Inspect the image's media type in notepad
    1. Go to the main manifest -> image index -> image manifest

Expected results

Media type = application/vnd.oci.image.manifest.v1+son

Actual results

Media type = application/vnd.oci.image.manifest.v1\u002Bjson

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0