Setup Sonatype Nexus as docker container using AWS ELB for HTTPS

Good afternoon everyone,

I’m brand new to Sonatype Nexus. I’ve deployed a nexus docker container on an AWS RHEL 8.1 Linux EC2 and configured an external ELB for https and I can login into docker just fine using the URL created.

The AWS ELB receives traffic on 443 and redirects to 8081.

I’ve created a docker hosted repository then created and assigned a role with docker permissions but when I try to login into the the repository using sudo docker login -u username -p password nexusrepo.domain.com I get a failed with status: 404 not found.

If I run netstat -lntp I get the following:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp6 0 0 :::5355 :::* LISTEN -
tcp6 0 0 :::8081 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN

I’ve tried using the ELB URL and I get a 404 not found, even if I specify the 443 port and I’ve tried internal private IP addresses and localhost directly and I can’t login.

When I try to specify from within the server to connect to localhost:5355 port, it waits a while and then it shows:

“Error response from daemon: Get #http://localhost:5355/v2/: EOF”

What am I doing wrong?

Thank you,
Ricardo

I had to tweak the text above because it kept saying that new users could only have 2 links in the post. but where it says: “When I try to specify from within the server to connect to localhost:5355 port, (…)” I’m using http://localhost:5355

Welcome to the Community and the Nexus family, Ricardo!

The docker client does make things tricky when trying to configure alternate registries. My first question to you is if 5355 is an HTTP Connector you created when configuring your docker repo in NXRM?

Good morning! Yes, I have. I’ve configured to be 5355.

When I try to connect via localhost with the following command:
sudo docker login -u docker -p docker localhost:5355

It’s ok to share this temporary password since the environment isn’t available from the internet.

I get the following response:

Error response from daemon: Get http://localhost:5355/v2/: EOF