Skip to content

hendisantika/spring-boot-docker-without-docker

Repository files navigation

3 Ways to Build Docker Images for Spring Boot Applications

I have three mechanisms in the same pom file which are put under different maven profiles.

  • Building Image with Spring Boot Build Plugin:

    mvn clean verify spring-boot:build-image
  • Building Image with Fabric8:

    mvn clean verify -DskipTests -Pbuild-with-fabric-8
  • Building Image with JIB:

    mvn clean verify -DskipTests -Pbuild-with-jib
  • Push Image to Docker Hub:

    mvn clean verify -DskipTests -Pdockerhub
  • Start the container

    docker run --name spring-boot-docker-without-docker -p 8080:8080 spring-boot-docker-without-docker:0.0.1
  • APIs for testing :

1st: https://localhost:8080/api/v1/customers


2nd: https://localhost:8080/api/v1/customers/male

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •