Rather than 127.0.0.1 I think that the route to the Docker host is always available within the container in bridge mode as the default route, so you just have to find it, here's how:
$ nc -lu 8125
$ docker run --rm -it ubuntu:latest /bin/bash
# apt install net-tools netcat
# export DOCKER_HOST_IP=$(route -n | awk '/UG[ \t]/{print $2}')
# echo 'Over here!' | nc -w 0 -u $DOCKER_HOST_IP 8125
And so we have the container send data over UDP to the default route which is the host (when docker container is run with net=bridge, the default).