1

in My Container ID 634eb4c5d6ee, This is my Ports : docker port 634eb4c5d6ee 222/tcp -> 0.0.0.0:222 8080/tcp -> 0.0.0.0:80 8443/tcp -> 0.0.0.0:443

i want Change 8080/tcp -> 0.0.0.0:80 to 8080/tcp -> 0.0.0.0:90

how can i do it on Docker ?

and Published port 80 to another Container ID 8e8caeca7a87

Mehran Goudarzi
  • 83
  • 1
  • 1
  • 9

1 Answers1

1

Per issue 3285, this is not yet possible (to modify port mapping on a running container).

Even the 1.10+ docker update command does not yet update ports.
This is followed by issue 21282.

You have other options in this answer, like using iptables, or committing the live container, and relaunching it.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • how can i published port to container ? `docker port 80 ContainerID` not work – Mehran Goudarzi Jun 12 '16 at 05:52
  • @MehranGoudarzi by relaunching it with the correct port mapping (once the first once has been also relaunched with a *different* port mapping) – VonC Jun 12 '16 at 05:53
  • im run `docker run -p 80:80 kali2` and `docker ps -a` i see it Created but ports is empty `6dfcd05c39ea kali2 "/bin/bash" About a minute ago Exited (0) 55 seconds ago ` now i start container `docker start 6dfcd05c39ea` seems not start my container – Mehran Goudarzi Jun 12 '16 at 06:00
  • @MehranGoudarzi That is a completely different question. Please ask a new one, with your OS and docker version (and a link to this one) – VonC Jun 12 '16 at 06:02