netcat udp connection hang inside UDP conatiner

Dockerfile

FROM ubuntu:latest
RUN apk add --update jq 
ADD  app /root
CMD ["/bin/bash","/root/test.sh"]

docker build -it x/abc
docker run -it x/abc

stats.sh

  • Spring Cloud microservices memory usage
  • Gunicorn graceful stopping with docker-compose
  • Access source container from recipient container
  • How to create a DB for MongoDB container on start up?
  • How to change jenkins volume on docker kitematic
  • Crontab does not work properly
  • !#/usr/bin/bash
    echo "something"
    echo "value"|nc -u -w0 server 8125
    

    nc -u -w0 server 8125 command works on my local workstation finer and data get sent to server but when test.sh run inside a container then nc command just hang and doesn’t send data to server.

    Any idea what could be causing nc to hang and why it doesn’t timing out?

  • Docker-compose - volumes driver local meaning
  • Docker Compose - one specific container randomly doesn't start properly
  • Simple Docker Concept
  • How to expose docker container's ip and port to outside docker host without port mapping on TinyCore?
  • How to enable MongoDB access control using a Docker container?
  • Disable access to LAN from docker container
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.