Gitlab access to third parties

Hi, I am very new to Gitlab and trying to set up in my environment. My Gitlab will need access to pull down npm libraries and images from Docker hub. I believe Docker images come from
Also it will need access to will be needed for package updates and during installation.

What ports should i be using to connect to these third parties from my Gitlab instance. My gitlab is on premise there is a security constraint to now allow the out bound request so we have to specify these with ports to access.

Any help is appreciated here please.