Last active
February 5, 2019 23:06
-
-
Save skuenzli/bf243a9ffe70960e288327743da8859c to your computer and use it in GitHub Desktop.
Simple Echo Service on Docker Swram
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create an 'echo' service on a Swarm that replies back whatever you send it | |
docker service create --name echo --publish '8000:8' busybox:1.29 nc -v -lk -p 8 -e /bin/cat | |
# talk to the service, assuming you're on a Swarm node; change localhost to a Swarm node hostname if remote | |
echo "hello netcat my old friend..." | nc localhost -w 3 8000 | |
echo "i've come to test connection behavior again." | nc localhost -w 3 8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment