How do I run Nexus 3.3.x as an insecure Docker registry on localhost?

766 views
Skip to first unread message

ljnelson

unread,
Apr 14, 2017, 1:19:45 PM4/14/17
to Nexus Users
Hello; I was wondering how to run my existing on-my-Mac-laptop Nexus installation as a Docker registry.

I am using Nexus 3.3.x and Docker for Mac.

For background, I've read everything. :-)  Specifically, I've read https://books.sonatype.com/nexus-book/3.0/reference/docker.html and https://books.sonatype.com/nexus-book/3.0/reference/admin.html#admin-repositories as well as thousands of out-of-date StackOverflow posts.  I am aware of the potential problems with insecure registries.

I've added a hosted Docker registry via the Nexus UI.  Its host is localhost and its port is 5771.

I've added:

    localhost:5771

...to the relevant UI section in my Docker for Mac installation ("Insecure Registries") and applied and restarted the daemon.

When I try to push a repository that looks like this:

    localhost:5771/foo/bar

...I get a connection refused error.

When I hit http://localhost:5771 in my browser, I get a 400 error, so Nexus is indeed answering the phone there.

I suspect the root of my troubles is that "localhost" of course means something different to the docker command line tool than what it means to the Nexus server.  However, I'm not sure how to move past this.

Thanks in advance for pointers,
Best,
Laird

Saul Alanis

unread,
Apr 14, 2017, 4:16:06 PM4/14/17
to Nexus Users
Hello - 

I posted about using Nexus as a registry on this list months back. I'd recommend reading through that thread carefully.

Af far as I can remember Nexus does not handle anonymous docker requests so you'll need to authenticate first. You'll also need to properly configure the Docker daemon.


If you search you'll find it.

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/ac0ad000-dd55-4130-be75-1ca7348b1d29%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.
Reply all
Reply to author
Forward
0 new messages