Available as Maven and Gradle plugins
- Fast
- Reproducible
- Daemonless
Command line interface for building optimized containers from file system content or JAR.
- We will be using the Spring Petclinic JAR in this demo
$ git clone https://github.com/spring-projects/spring-petclinic.git
$ cd spring-petclinic
$ ./mvnw package
- Jib a JAR
$ jib jar --target=docker://cli-jar-demo target/spring-petclinic-*.jar
- Run the image and open your browser http://localhost:8080
$ docker run -p 8080:8080 cli-jar-demo
- Let's explore the layers
$ dive cli-jar-demo
- Get your script ready
- Create build file
- Build to local docker daemon
$ jib build --target=docker://cli-build-demo
- Run the container
docker run cli-build-demo