Public Repository

Last pushed: a year ago
Short Description
A simple web-app
Full Description

Dockerfile

FROM saugupta/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 saugupta/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
GET /random : Prints a random number
GET /ip : Prints the IP address of the machine on which the app is running
DELETE /map : clear map, print
DELETE /map?key={key} : remove value for key, print
POST /exit : System.exit(1)


Source
https://github.com/saugupta/sample-apps/tree/master/web-app

Docker Pull Command
Owner
saugupta

Comments (0)