Sign inSign up

kmalik/web-app

By kmalik

•Updated almost 11 years ago

Simple web application

Image
0

1.4K

kmalik/web-app repository overview

⁠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⁠

Tag summary

Content type

Image

Digest

sha256:43ad929bc…

Size

261.2 MB

Last updated

almost 11 years ago

docker pull kmalik/web-app