Can't login to private docker registry it says Error response from daemon: 502 Bad Gateway

Viewed 1971

can't login to private docker registry it says Error response from daemon: login attempt to http://hostname:5000/v2/ failed with status: 502 Bad Gateway

in /etc/hosts added ip and hostname

in /etc/docker/daemon.json added

{
  "insecure-registries" : ["hostname:5000"]
}

restarted docker but still error is coming please help me out

I know the problem http://hostname:5000/v2/ is not valid it should be https://hostname:5000/v2/ but I am not sure how to redirect to https

1 Answers

Had a similar issue when deploying a Docker application to QA environment in Jenkins.

Here's how I solved it: for me it was a temporary connectivity issue. All I had to do was retry the deployment process again in Jenkins after 1 to 2 minutes and it worked fine.

Related