Simple container that expose a service with common endpoints for testing a service (echo, echoheaders, hostname, fqdn, ip).
docker run -d -p 8080:8080 --rm fabriziopandini/service
** /echo endpoint **
curl --data "hello echo" localhost:8080/echo
Returns echo of the request body.
** /echoheaders endpoint **
curl localhost:8080/echoheaders
Returns echo of the request headers.
** /hostname endpoint **
curl localhost:8080/hostname
Returns the container hostname.
** /fqdn endpoint **
curl localhost:8080/fqdn
Returns the container fully qualified name.
** /ip endpoint **
curl localhost:8080/ip
Returns the list of containers ip.
** /env endpoint **
curl localhost:8080/env
Returns the list of container env variables.
** /exit/exitCode endpoint **
curl localhost:8080/exit/0
curl localhost:8080/exit/1
Exit from the service and returns the given code