One Solution collect form web for “docker: cannot map two container ports to one host port”

You can’t have two things listening on one port in the host – whether they’re separate ports in one container, or two Docker containers, or two other apps. It’s not a Docker limitation, it’s part of the OS networking stack.

Where would the host send a request to port 8080 if you could do that in this case? To port 8080 in the container, or port 8081, or multicast it to both?