Docker Community Forums

Share and learn in the Docker community.

Why different port number is mapped on ipv4 and ipv6 address for same expose port?

With docker version 20.10.6, build 370c289. observed that different port is assigned for same exposed port on ipv4 and ipv6 addresses. Why?

$ docker ps --format "{{.Ports}}"
0.0.0.0:49338->9999/tcp, :::49337->9999/tcp
0.0.0.0:49339->6379/tcp, :::49338->6379/tcp
0.0.0.0:49319->6379/tcp, :::49318->6379/tcp