Skip to content

Different port number are getting mapped on ipv4 and ipv6 for same expose port #42442

@gkhandake

Description

@gkhandake

Description

With docker version 20.10.6, build 370c289 observed that different port is assigned for same exposed port on ipv4 and ipv6. This is causing random failures in application with docker compose up which spawns many different apps containers

$ 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

Steps to reproduce the issue:

  1. Install docker version '20.10.6, build 370c289'
  2. use docker-compose up with multiple types of container and expose a port on each container

Describe the results you received:

  1. Observe post docker compose up the ipv4 and ipv6 uses different ports

Describe the results you expected:

  1. the 1 port should be used for both ipv4 and ipv6 ports for a exposed port

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

20.10.6, build 370c289

Output of docker info:

(paste your output here)

Additional environment details (AWS, VirtualBox, physical, etc.):

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions