More on this behavior here:
It's a function of the webserver not isolating the session authentication cookies per host:ip - only per host. There's a workaround mentioned there, but I wouldn't necessarily recommend it unless you really know what you're doing.
If you're developing entirely on the local machine, there should be internal IPs for each container that are unique - something like 172.17.0.X
. You can access whatever port on that internal IP, regardless of what the container is set to expose.