From the log you attached, the failure is on session.login_with_password, and XO tries ::1:443 and then 127.0.0.1:443.
So it is XO trying to reach a host, not your remote, and whatever address it holds for that host is resolving to loopback.
You rebuilt one of the three nodes and you moved XO into Docker, so my guess is the host came back into the pool with a hostname instead of an IP, and that name does not resolve inside the container the way it did for the script install.
It would fit the rest too: migration goes host to host over the management address, copying does not, which is why one works and the other doesn't.
Could you paste the output of xe host-list params=uuid,name-label,address? I am guessing here, and @Team-XAPI-Network will know much better than me whether resetting that address is the right move.