Skip to content

bindstone/docker-actuator

Repository files navigation

Docker - Spring Actuator

This is a simple POC for:

  • docker

  • docker-compose

  • spring actuator

Install and run

Testing approaches

docker-actuator-server

INSIDE BUILD: In this approach the base image is [maven:3.6-jdk-8-alpine]. It contains next to the JDK also the Maven tools. During the process to build the image, Docker will copy source in the image, download all Maven dependencies in the image repository, build the artifacts and start the server.

The image itself is bigger in size, as the dependency objects are multiple time in the image present: * maven repository, * maven build jar, * maven build jar with tomcat * …​

docker-actuator-client

OUTSIDE BUILD: In this approach the base image is [openjdk:8-jdk-alpine]. During the process to build the image, only the artifact docker-actuator-client.jar will be copied in the image. This requires a preprocess by the developer or building tools like Jenkins to execute the maven build outside.

docker-actuator-client-multi

MULTI STEP BUILD: In this approach the build is done on the correct way, using a first step to creating the artifacts and a second step copying only the generated file in the final instance.

Results

When starting the docker-compose you should access to the different server and clients.

Rest request:

Also accessing to Actuator: http://127.0.0.1:8888/#/wallboard

actuator wallboard

Shows you tree running services, and one client has currently 2 running instances and for the multi step build a separate.

and you can click on the services to get more details like:

actuator details

Releases

No releases published

Packages

No packages published