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
rollback is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.