I have a bash script in my docker container that use netcat to receive a datagram from a raspberry with this command:
msg_port=60001
nc -k -u -l -p $msg_port >> /data/hydro/info.txt &
Now, i have tested this script on my computer (outside of container) and it works.
But when i run it with a container, that use netcat-traditional, in the first run it works perfectly. But if i restart the script in the raspberry without restarting the container, it seems to no longer receive data, even if it remains listening.
I think the problem is that the netcat command is unable to accept new connections, althought -k option should be used to avoid this problem.
I repeat that, outside of the container, everything works
ncon the host machine where the script has been tested and in the container?1.226-1 (netcat-OpenBsd)and version in the container is1.10-48 (netcat-traditional)nc 1.226-1 (netcat-OpenBsd)in the container.