Docker IP addresses and ports

Hi All. I’ve installed docker on win10 at home and pulled several images without problems. But now I should do the same on may office computer. I need to explain security service which addresses and ports should be opened. Pleas tell my which IP addresses is used to pull images from hub? Thanks

Hello.

curl -v https://index.docker.io:443

If you do that, you can find the ip address of docker hub. But this address changes over time. So, adding Docker Hub to the whitelist based on IP is not a good solution.

Note Link:

1 Like
nslookup index.docker.io

Output

Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	index.docker.io
Address: 54.227.20.253
Name:	index.docker.io
Address: 54.198.86.24
Name:	index.docker.io
Address: 54.236.113.205
Name:	index.docker.io
Address: 2600:1f18:2148:bc01:571f:e759:a87a:2961
Name:	index.docker.io
Address: 2600:1f18:2148:bc02:445d:9ace:d20b:c303
Name:	index.docker.io
Address: 2600:1f18:2148:bc00:8d61:9b62:40aa:8bb8

So it has more than one IP addresses and not only IPv4. Curl would show only one, the one that was used for the request.

Note: I got only ipv4 addresses on macOS, even though curl chose an ipv6 address so I ran this command from Linux

These IP addresses could change too, but it is not likely to change frequently as some clients could fail to connect when the IPs are already cached. So as long as they use 3 servers, these ip addresses are likely to work.