your container group and user id can run into networking issues if you responsibly denied the access to everyone (guest) except for current user (this is in environment variables, if I recall correctly, you can go to admin numbers of gid/pid, check if it fixes stuff, and then deescalate them to something working, i think container can’t claim privileges higher than docker itself, so there is some shit to troubleshoot there)
check that your firewall on the server is not blocking (or clashing, check with netstat) port range you use and/or docker itself (i once run into firewall rule blocking python in the thingy i was using, that wasn’t fun), rebind the port to different one in any scenario, reboot, check again.
check router firewall rules for local networking, check you are using correct ip of server (check you can ping server as an entity, bind it to static in router, and remove old leases, reset router if you can’t remove old leases).
this is general order i fumble containers when i forgor
(also, you can enter into terminal from inside the container, and check out what it sees networking wise)