# Distinguish between multiple docker registries

**URL:** https://community.sonatype.com/t/distinguish-between-multiple-docker-registries/8206
**Category:** Best Practices
**Tags:** docker
**Created:** [February 8, 2022, 6:47pm UTC](https://community.sonatype.com/t/distinguish-between-multiple-docker-registries/8206 "2022-02-08T18:47:01Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![ralph.bolton](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@ralph.bolton](https://community.sonatype.com/u/ralph.bolton)
#### Post date: [February 9, 2022, 4:40pm UTC](https://community.sonatype.com/t/distinguish-between-multiple-docker-registries/8206/3 "2022-02-09T16:40:05Z")

</div>

Just to add to Dawid’s answer…

Docker can’t use “paths” to work out which repository to use, so you can’t have `https://nexus.example.com/docker/repo1` and `https://nexus.example.com/docker/repo2` or whatever. Instead, you have to use port numbers, so you’d open (say) port 9000 for repo1 and 9001 for repo2. Each repository has to be created with a port number, and they have to be unique. That’ll give you `http://nexus.example.com:9000` and `http://nexus.example.com:9001` (although docker command lines omit the `https://` prefix).

In my case, I’m running an nginx reverse proxy in front of the Nexus web port (so I can use TLS, a certificate, etc). Since I’m doing that, I also use nginx to “reverse proxy” the docker ports too. So in my nginx config I’ve got some stuff about port 443, port 9000, 9001 etc. If I remember correctly, you **have** to use TLS with Docker, so you’ll need to make sure you provide TLS somewhere/somehow in your setup.

---

_[View the full topic](https://community.sonatype.com/t/distinguish-between-multiple-docker-registries/8206)._
