Docker Community Forums

Share and learn in the Docker community.

Port not reachable on local network ip

I have a gitlab running on port 80 and a gitlab registry running on port 5000. Both are in a network with my nginx but I only reach the gitlab port while using the internal ip. (all curls are from inside the gitlab container)

root@f2adb93ff821:/# curl localhost
<html><body>You are being <a href="http://localhost/users/sign_in">redirected</a>.</body></html>

root@f2adb93ff821:/# curl
<html><body>You are being <a href="">redirected</a>.</body></html>

root@f2adb93ff821:/# curl localhost:5000/v2/
{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}

root@f2adb93ff821:/# curl
curl: (7) Failed to connect to port 5000: Connection refused