JVM 1.8u181 info inside Docker container
- Maven
- Docker
Create jar and Docker images
mvn clean install
This will produce Spring Boot application with a singe REST enpoint /jvm
, showing JVM and environment info
Produced images are:
cnj/openjdk-jvm-info
: image based onopenjdk:8u181-jdk-slim-stretch
cnj/fabric8-jvm-info
: image based onfabric8/java-centos-openjdk8-jdk
Why 2 images? In order to compare how fabric8 overcome limitations of JVM 8 inside Docker.
This project use Docker stacks. Enter Swarm mode
docker swarm init
Then run OpenJDK
docker stack deploy -c src/docker/openjdk/stack.yml openjkd-jvm
And go to https://localhost:8080/jvm
Compare what declared in src/docker/openjdk/stack.yml
with result of https://localhost:8080/jvm
: number of core will never match due to a bug fixed in version 10
For Fabric8 version
docker stack deploy -c src/docker/openjdk/stack.yml openjkd-jvm
And go to https://localhost:8081/jvm