Nexus 3 Docker Registry behind Traefik v.2

Hey there, I have a similar problem to the one described here:

with the difference that I'm using Nexus3 as a docker registry (therefore I cannot apply the solution proposed in the post).

My problem is described in details in this post on stack overflow:

Any ideas how to solve it?

There is guidance from sonartype on running behind a reverse proxy.

https://help.sonatype.com/repomanager3/installation/run-behind-a-reverse-proxy
https://help.sonatype.com/repomanager3/system-configuration/capabilities/base-url-capability

I came across the documentation, however, I have no problem running nexus as such behind the traefik. I can fetch from and deploy to maven repo (same server, different port), I can also login to the nexus docker registry. The problem appears when I try to push into it.
The mentioned documentation unfortunately only covers httpd and nginx.
Don't quite understand would be the use of the base url capability mentioned in the second link.

Hi @moor,
Just wanted to come and say I solved this. Although I imagine you found a solution as well. You basically have to setup two separate routers and services within traefik. One to serve regular Nexus traffic, and the other to serve up docker requests. Then just expose a docker port (I chose 8082 cause nexus defaults docker ports to 8082) and set up that port in the nexus in Settings -> Repositories -> -> Repository Connectors. I chose http, but if you've got a valid cert or just want to self-sign one you could use https. Just make sure to use insecureSkipVerify: true in the yaml or label if it's self-signed. Then just use this configuration as an example to build out your labels or file:

http:
  routers:
    nexus-router:
      tls:
        certresolver: mydnschallenge
      entryPoints:
        - https
      service: nexus-service
      rule: Host(`nexus.example.com`)
    nexus-docker-registry:
      tls:
        certresolver: mydnschallenge
      entryPoints:
        - https
      service: nexus-docker-service
      rule: Host(`docker.example.com`)
  services:
    nexus-service:
      loadBalancer:
        servers:
          - url: "http://192.168.17.185:8081"
    nexus-docker-service:
      loadBalancer:
        servers:
          - url: "http://192.168.17.185:8082"