Run the server with
-
docker run -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:17
Test with
-
curl -k -X PUT -H "Arbitrary:Header" -d aaa=bbb https://localhost:8443/hello-world
Or run it inside my main docker network this is the compose I used:
-
echotest:
-
image: mendhak/http-https-echo:17
-
networks:
-
- main_net
Then I made a rule in kong to forward
Service: http://tasks.echotest:8080
Route:
- host: cat-sdts4.metcarob-home.com
- path: /echotest
-
Then I can goto
http://cat-sdts4.metcarob-home.com/echotest
and get the test
This gives me a nice testing endpoint I can test out kong modules with.
Single command to run this on my swarm
-
docker service create \
-
--name echotest \
-
--network main_net \
-
--constraint 'node.labels.datastore003 == true' \
-
mendhak/http-https-echo:17
Test it
-
curl -v -k -X PUT -H "Arbitrary:Header" -d aaa=bbb tasks.echotest:8443
RJM Article Type
Quick Reference