Azure container app, unable to pull from private registry
Asked Answered
D

1

6

I have just created an Azure Container App and I am trying to link it to a private repository on docker.io. It works if I make it pull a public image but not if it's private, even though I specified all the information. I have also used the automatic "continuous deployment" with github (the azure portal basically did everything, which one would assume would work), I entered the same information ( docker.io, username and password and the image tag, all working when I test in console ), the generated github action is able to build and push to docker registry, proving the user and password are good, but it doesn't want to update the container app either.

Here is the latest error I had trying to do it through the github action: The following field(s) are either invalid or missing. Invalid value: "docker.io/pasc32/companio:latest": GET https:: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:pasc32/companio Type:repository]]: template.containers.test.image.

When I try to do it directly from the portal, it'll add a notification at the top, which will turn forever, if I refresh the page nothing's change and the container is back to how it was before, no trace of the notification in the activity log either.

enter image description here

Does anyone have an idea of what the issue it ?

Thank!

Duda answered 28/10, 2022 at 15:36 Comment(0)
H
13

This is a known issue and container apps team is working on it. As a workaround, use registry.hub.docker.com as the server value instead of docker.io.

Heigho answered 28/10, 2022 at 18:55 Comment(4)
I tried replacing it in the github action that was generated for me, it is still giving me this error in the github action : The following field(s) are either invalid or missing. Invalid value: "***/companio:v0.12": GET https:: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:***/companio Type:repository]]: template.containers.companio.image. The docker login worked so the user and password should be goodDuda
Did this unblock your portal scenario?Heigho
It initially only worked in the portal. I ended up adding "registry.hub.docker.com/" in front of everywhere I had a reference name the package name/tag in the github action script and it worked! Huge thanks. I assume this is viable for production? I don't need to worry about it...Duda
Yes. Eventually, docker.io should work.Heigho

© 2022 - 2024 — McMap. All rights reserved.