Public Repository

Last pushed: 2 years ago
Short Description
Simple web application
Full Description

Dockerfile


FROM kmalik/ubuntu-java
ADD target/web-app.jar /web-app.jar
ENTRYPOINT ["/bin/bash", "-c", "java -jar web-app.jar $*"]

Usage

sudo docker run --net=host -it kmalik/web-app

Port : 8080
Endpoints :

  • GET / : redirect to /status
  • GET /status : print running
  • GET /hello?name={name} : print 'Hello {name}'
  • POST /map?key={key}&value={value} : set key-value pair, print previous value for key if any
  • GET /map : print map
  • GET /map?key={key} : print value for key
  • DELETE /map : clear map, print
  • DELETE /map?key={key} : remove value for key, print
  • POST /exit : System.exit(1)

Source

https://github.com/kapil-malik/sample-apps/tree/master/web-app

Docker Pull Command
Owner
kmalik