Docker driver: Getting images from private docker registry (hosted on private nexus machine)

919 views
Skip to first unread message

paris....@snap40.com

unread,
May 15, 2017, 10:56:03 AM5/15/17
to Nomad
Hi,

According to nomad documentation I should be able to do this

```

config {
    image = "hello/world:latest"
    auth {
      username = "testuser"
      password = "testpassword"
      server_address = "my.docker.registry.com"
    }
  }

```

and get a docker image from my login protected private docker registry.

However allocation log is

> Failed to pull `hello/world:latest`: API error (401): {"message":"Get https://registry-1.docker.io/v2/

It looks like nomad ignores the server_address I've specified and doesn't even try to connect to my private registry.

Am I doing something wrong?

---
Nomad version: 0.5.4
---


Thanks for your help
Paris

Craig Sawyer

unread,
May 15, 2017, 11:29:41 AM5/15/17
to Nomad
Hey Paris,

This works for me:

             image = "registry.service.consul:5000/mattermost:3.8.1"
                auth {
                    username = ""
                    password = ""
                    }


As you can see, I put the registry address in the image name, and don't use server_address.
Looks like maybe you found a bug in nomad not honoring server_address. If that's the case, you should file an issue on github.

-Craig
-Craig

Paris Morali

unread,
May 24, 2017, 5:44:05 AM5/24/17
to Nomad
Hey Craig,

Finally got around to test out your suggestion. Does the trick thanks :-)
FYI in the mean time someone got back from the Nomad team saying that the problem probably lies on the docker side: https://github.com/hashicorp/nomad/pull/2190#issuecomment-301866838
So I won't be opening an issue on that.

Thanks a lot for your help!

Paris

--

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/nomad/issues
IRC: #nomad-tool on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Nomad" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nomad-tool/OyPtcx2i87w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nomad-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nomad-tool/98ec89d6-a629-40ed-86b0-d80b0fa1826d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



Notice: snap40 Limited is a private limited company incorporated in Scotland with registered number SC481544 (the “Company”). Our registered office is at 5th Floor, 125 Princes Street, Edinburgh, EH2 4AD.  For further information you can visit our website at http://www.snap40.com/

This message is intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to us, and immediately and permanently delete it. Do not use, copy or disclose the information contained in this message or in any attachment.

Disclaimer: Opinions, conclusions and other information in this e-mail expressed by others or which do not relate to the Company are neither given nor endorsed by the Company. The e-mail and IT systems of the Company may be subject to random monitoring and recording.  It is your responsibility to scan this email and any attachments for computer viruses or other defects. We do not accept liability for any loss or damage which may result from this email or any attachment. Please note that email is not secure and can be intercepted, corrupted or amended. We do not accept liability for errors or omissions arising as a result of interrupted or defective transmission of this email or any attachment.

Reply all
Reply to author
Forward
0 new messages