Returns an incrementing integer (starting with 1) on a network connection, then disconnects
10K+
A tiny Docker container that simply returns an incrementing count over the network via netcat (nc) and bash.
https://hub.docker.com/r/drosenbauer/docker-counter
You may specify the port as an environment variable PORT. Default port if not specified is 12345 (for counting, get it?). Note that 12345 is commonly used by malware, so your system administrators may appreciate it if you choose a different one.
Note the use of PORT to listen on 54321.
devin$ docker run -it -ePORT=54321 -p 54321:54321 drosenbauer/docker-counter:latest
Listening on port 54321
The container will emit no further output after this initial message.
devin$ nc localhost 54321
1
devin$ nc localhost 54321
2
devin$ nc localhost 54321
3
Content type
Image
Digest
sha256:cb30229db…
Size
4.2 MB
Last updated
about 3 years ago
docker pull drosenbauer/docker-counter