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 172.26.0.4
<html><body>You are being <a href="http://172.26.0.4/users/sign_in">redirected</a>.</body></html>


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

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