This is a sample springboot project with health end-point
- JDK11
- Maven 3.6.3+
- Docker
- JDK11 image with tag test/openjdk:11 on local machine. From DockerHub get this image
openjdk:11
and tag it as required.
-
Drop into shell prompt.
-
Execute command
mvn -verison
. -
One might see output similar to
Maven home: /usr/local/apache-maven-3.6.3 Java version: 11.0.6, vendor: Azul Systems, Inc., runtime: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"
- Clone the project.
- Navigate to project home directory from shell prompt.
- Execute command
mvn clean verify
. What happens ?- Docker image with tag
test/example:0.0.1
gets created. To validate usedocker images
command. - Docker container gets spun and health end-point is accessed.
- Failure to access the health will result in build failure.
- At the end of the process container gets shutdown.
- Docker image with tag