neumanndaniel/kubernetes

Problem with removing dangling multi-arch container manifests from Azure Container Registry

Wesztman opened this issue ยท 5 comments

Hi Daniel!

First of I want to express a huge thanks to you for your work in this repo, its invaluable! So thanks for that!

I'm trying to run the following script in an azure devops pipeline

https://github.com/neumanndaniel/kubernetes/blob/master/acr/Remove-UntaggedManifestsDockerBuildx.ps1

But when I get to a multi-architecture repo I get

image

Does this have to do with the line

$HEADERS = @{ 'accept' = 'application/vnd.docker.distribution.manifest.v2+json' } ?

Since the image is marked as,

image

Do you have any safe fix for this? :)

Cheers
Carl

Would it be safe to just do? ๐Ÿค”

$HEADERS = @{ 'accept' = 'application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.index.v1+json' }

The v2 media type does not seem to have any manifests section ๐Ÿค” so it might have to accept the oci v1 media type to even work correctly?

image

Hi @Wesztman,

sorry for the late reply. I need to check my GitHub notifications more frequently. :D

I assume you already have verified the adjustment you proposed in your PR, if that is correct I am happy to accept the PR and merge it.

Thanks,
Daniel

Hi @neumanndaniel ๐Ÿ˜Š no problems! This is verified and working as intended ๐Ÿ‘

Thanks for the contribution I merged the PR. ๐Ÿ™‚