- Get Docker
- Get SBT
- Run
sbt assembly
- this will create a fat-jar with the server - Build the docker image:
docker build .
. Note the final image id. - Run a container basing on the image, remapping the ports:
docker run --rm -p 9090:8080 [image id]
- Enjoy! Example requests:
curl "http://localhost:9090/hello"
curl "http://localhost:9090/counter/c1"
curl -XPOST "http://localhost:9090/counter/c1?amount=1234"
You can also get a ready image from the Docker index.