Sign inSign up

fabriziopandini/helloservice

By fabriziopandini

•Updated over 7 years ago

Simple container that exposes a dummy service with common endpoints for testing

Image
0

5.3K

fabriziopandini/helloservice repository overview

⁠Overview

Simple container that expose a service with common endpoints for testing a service (echo, echoheaders, hostname, fqdn, ip).

⁠Usage

docker run -d -p 8080:8080 --rm fabriziopandini/hello

** /echo endpoint **

curl --data "hello echo" localhost:8080/echo

or

curl --data "hello echo" localhost:8080/

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

** /healthz endpoint **

curl localhost:8080/healthz

Returns 200 and a message with uptime info

** /healthz-fail/failAfter endpoint **

curl localhost:8080/healthz-fail/10

if uptime less than failAfter, returns 200 and a message with uptime info, otherwise returns 500 and a message with uptime info,

Tag summary

Content type

Image

Digest

Size

1.4 MB

Last updated

over 7 years ago

docker pull fabriziopandini/helloservice