Reputation: 5451
Being new to Docker, I have a basic question on why Docker uses the port numbers ranging from 32768 to 65535 ?
Why is that particular range selection ? Are other ports not useful ?
Can someone help me in understanding this better..
Upvotes: 6
Views: 5204
Reputation: 17983
The port numbers in the range from 0 to 1023 are the system ports. These are used for standard, well-known network services. They are also restricted, so only the super user is able to bind to one of these.
Next ranges of ports, especially under 10000, are still usually a standard ports of some services, but they are not restricted. Some common examples are 8080 (HTTP alternative), 8443 (HTTPS alternative) or 1099 (Java RMI registry). See this for more examples.
Range of 32768 to 65535 is quite safe to just get a random one and use, because they are not used widely.
Upvotes: 3
Reputation: 682
Short answer: These ports were once defined for being not to be reserved for some special use like 80 or 443.
Long anwser: Best TCP port number range for internal applications
Upvotes: 3