Azure-docs: Private docker hub image example

Created on 6 Jun 2018  Â·  9Comments  Â·  Source: MicrosoftDocs/azure-docs

It would be great to see an example showing how to configure a container instance to pull from a private docker hub image.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

assigned-to-author container-instancesvc doc-enhancement triaged

Most helpful comment

Thanks, @dankellett, my apologies for the slow reply, here. To deploy to ACI from a private Docker Hub repository, the Image registry login server must be index.docker.io. For example, here are the settings I used to successfully deploy from my own private repository on Docker Hub:

image

If you could, can you give that a try and let us know how it goes?

Thanks, -MM

All 9 comments

Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.

Hi @dankellett, thanks for the feedback. Were you interested in seeing how to do so in the portal specifically, or pulling an image from a private repository in general?

I was interested in the portal, but I'd also be interested in cli. When I attempted this myself, I was having trouble getting authentication to work correctly against the hub.docker.com repo.

Thanks, @dankellett, my apologies for the slow reply, here. To deploy to ACI from a private Docker Hub repository, the Image registry login server must be index.docker.io. For example, here are the settings I used to successfully deploy from my own private repository on Docker Hub:

image

If you could, can you give that a try and let us know how it goes?

Thanks, -MM

Hi @dankellett, checking in to see if you've had a chance to give this a try.

Hi @mmacy, I attempted following your example and I am getting a deployment failure. I've entered my regular docker hub credentials, verified correct password a few times.

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.","details":[{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"InaccessibleImage\",\r\n \"message\": \"The image 'mrdankellett/gettingstarted' in container group 'kelletttest3' is not accessible. Please check the image and registry credential.\"\r\n }\r\n}"}]}

image

@dankellett Hmm...I'm unable to repro this issue. To mirror as closely as possible your environment, I deleted all other images out of my repository, save for my private "aci-helloworld" repo, deployed to West US 2 in a new RG named "containerrg," and was able to deploy successfully. Even bumped my password length such that it was longer than yours, just in case.

I assume you are able to docker pull the image successfully using the Docker CLI, otherwise the image wouldn't already be in the registry, but can you confirm?

@yangl900 Anders, might you have any ideas on this one? Dan is unable to deploy from a private Docker Hub repo, and as far as I can tell, everything looks OK.

I was missing the correct tag, I added the "latest" default tag to the image and this now works for me.

I think it might be a good idea to add this to the docs still, if it hasn't been already. I've been struggling with this for a good 30 minutes trying to figure out how to deploy from a private image on Docker Hub. As far as I can tell, there's tons of documentation for deploying from ACR, but nothing for deploying from Docker Hub. The thing that tripped me up was the "Image registry login server". I tried docker.com, hub.docker.com, with protocols, without protocols, with /v2, /login, etc., but never thought to try index.docker.io. I finally gave up and was about to just create an ACR so I could move on, and then I finally found the link to this issue at the bottom of the docs page.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Favna picture Favna  Â·  3Comments

monteledwards picture monteledwards  Â·  3Comments

JamesDLD picture JamesDLD  Â·  3Comments

bityob picture bityob  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments