Unable to import image to container registry

AgBe DevOps 1 Reputation point
2022-12-20T14:34:33.647+00:00

Hi,

I have been using import operation in Azure Container Registry for some time without any issues but lately I am getting the below error consistently.

$ az acr import --name *****registry --source quay.io/jetstack/cert-manager-controller:v1.5.4 --image jetstack/cert-manager-controller:v1.5.4

(InvalidParameters) Operation registries-6ae76c3e-806e-11ed-94b2-#### failed. Resource /subscriptions/b38946e9-e907-4201-a5e6-####/resourceGroups/####-rg/providers/Microsoft.ContainerRegistry/registries/*****registry Error copying blobs. Error copying blobs. Error copying blobs. Error copying blobs. Error copying blobs.
Code: InvalidParameters
Message: Operation registries-6ae76c3e-806e-11ed-94b2-#### failed. Resource /subscriptions/b38946e9-e907-4201-a5e6-####/resourceGroups/*****-rg/providers/Microsoft.ContainerRegistry/registries/*****registry Error copying blobs. Error copying blobs. Error copying blobs. Error copying blobs. Error copying blobs.

Below image shows that I am able to download image directly with docker command.

272591-image.png

Someone reported similar issue at https://github.com/Azure/acr/issues/632 as well but remains inconclusive.

Can someone please have a look why such a basic operation is failing? Also why the error message is so abstract for anyone to act on it?

Happy to share more details if needed.

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
508 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Eddie Neto 1,251 Reputation points Microsoft Employee
    2022-12-20T17:07:51.72+00:00

    Hi @AgBe DevOps

    Thanks for raising your question to the Microsoft learn.

    After making some analysis, this issue is because Quay does not honor requests for ranged blob queries, which ACR's import feature depends on. This is known issue with quay.io failing to support ranged queries.

    For now, we recommend first pulling quay.io cert-manager images using docker, tagging them to ACR, and then pushing them to your ACR registry.

    Using az acr command is going return the issue shared above by you and also from my side.

    272525-image.png

    Using docker will mitigate the issue for you. Hope that helps.

    272594-image.png

    2 people found this answer helpful.
    0 comments No comments

  2. Markus Blaschke (Daimler Truck AG) 1 Reputation point
    2023-01-10T14:42:33.92+00:00

    @Eddie Neto Is there any ETA when this is fixed? This issue fills our ACRs with broken images and there is no good way to check which images are broken now.

    Why is the ACR import relying on ranged blob queries? It's that an optional HTTP feature?

    Pulling images using docker isn't a solution when dealing with multi-arch containers. This is a real blocker when dealing with quay images currently.


  3. Markus Blaschke (Daimler Truck AG) 1 Reputation point
    2023-01-10T14:54:24.73+00:00

    docker native workaround with multi arch container support (but requires "docker buildx"):

    IMAGE_SRC=quay.io/foo/bar:v1.0 IMAGE_DEST=foo.azurecr.io/foo/bar:v1.0

    docker buildx imagetools create --tag "$IMAGE_DEST" "$IMAGE_SRC"

    0 comments No comments

  4. Eddie Neto 1,251 Reputation points Microsoft Employee
    2023-01-13T15:39:54.7333333+00:00

    @AgBe DevOps / @Markus Blaschke (Daimler Truck AG)

    Issue is mitigated for now. Just tested from my side and is working. Hope you can test from your side and let me know the result.

    Hope this helps. Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.