moby: Docker -p ip:hostPort:containerPort and ip::containerPort not compatible with IPv6 addresses

Docker --publish is not compatible with IPv6 if one wants to use he IP:host_port:container_port argument format. Even when address is provided in the well-known form of [IPv6] it does not work:

docker: Invalid format to parse. [2001:470:6267:324::c2]:53:53 should match template ip:hostPort:containerPort. See 'docker run --help'.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 6
  • Comments: 17 (7 by maintainers)

Commits related to this issue

Most upvoted comments

For those watching this issue, I’ve sent https://github.com/docker/docker/pull/20315 which contains a working implementation that addresses this issue. Not sure whether discussion is supposed to happen on the PR or here.

Still not working with 1.12.1, build 23cf638

docker: Invalid format to parse. [::1]:1000:8000 should match template ip:hostPort:containerPort.