Public | Automated Build

Last pushed: 2 months ago
Short Description
Simple container that exposes a dummy service with common endpoints for testing
Full Description

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,

Docker Pull Command
Owner
fabriziopandini
Source Repository

Comments (0)