https://github.com/mendhak/docker-udp-listener
https://github.com/mendhak/docker-udp-listener
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mendhak/docker-udp-listener
- Owner: mendhak
- Created: 2016-03-12T19:36:21.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-30T21:32:14.000Z (over 9 years ago)
- Last Synced: 2025-02-28T08:16:41.022Z (11 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 18
- Watchers: 2
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mendhak/udp-listener [](https://microbadger.com/images/mendhak/udp-listener "Get your own image badge on microbadger.com")
Docker image that listens on a specified UDP port, outputs to container log.
### Start it
By default, you can run it like this
docker run -p 0.0.0.0:5005:5005 -p 0.0.0.0:5005:5005/udp --name udp-listener mendhak/udp-listener
You can make it listen on another port
docker run -p 0.0.0.0:4444:4444 -p 0.0.0.0:4444:4444/udp -e UDPPORT=4444 --name udp-listener mendhak/udp-listener
#### Test it
In another terminal:
nc -u localhost 5005
And start sending data. You should see your text reflected in the `docker run` terminal
### Docker Compose
```
udp:
container_name: my-udp-listener
image: mendhak/udp-listener
environment:
- UDPPORT=4001
ports:
- "0.0.0.0:4001:4001"
- "0.0.0.0:4001:4001/udp"
```
View its logs:
docker logs my-udp-listener