My playground for experimenting with Dropwizard and Docker…
-
Simple REST-service based on http://www.dropwizard.io/1.2.2/docs/getting-started.html
-
Custom HealthCheck (
myTemplateHealthCheck) -
Custom Metrics (
myRequestCounter,myRequestTimer)
-
-
Exposed JMX-statistics
-
Integration of Jolokia for exposing JMX via HTTP
-
Dockerization
-
Create image with:
docker build . --tag dropwizardexample -
Create and run container with JMX:
docker run --rm -p 127.0.0.1:9090:8080 -p 127.0.0.1:10005:10005 -p 127.0.0.1:9091:7777 --name dropwizardcontainer dropwizardexample:latest -
Open webapp in browser at http://localhost:9090/hello-world?name=markiewb
-
Access JMX:
-
In the container: Access Jolokia via
curl -X GET http://127.0.0.1:7777/jolokia/ -
On the host: Access Jolokia via
curl -X GET http://127.0.0.1:9091/jolokia/ -
Connect with JMX-Client at
localhost:10005
-