jib README

The project's README from github.com/GoogleContainerTools/jib. As one markdown file: README.md.

stable Maven Central Gradle Plugin Portal Build Status Build Status Build Status SLSA 3 Gitter version

Jib

Jib - Containerize your Java applications.
☑️ Jib User Survey
What do you like best about Jib? What needs to be improved? Please tell us by taking a one-minute survey. Your responses will help us understand Jib usage and allow us to serve our customers (you!) better.

What is Jib?

Jib builds optimized Docker and OCI images for your Java applications without a Docker daemon - and without deep mastery of Docker best-practices. It is available as plugins for Maven and Gradle and as a Java library.

Jib works well with Google Cloud Build. For details, see how to use Jib on Google Cloud Build.

For more information, check out the official blog post or watch this talk (slides).

Goals

Quickstart

Examples

The examples directory includes the following examples (and more).

How Jib Works

Whereas traditionally a Java application is built as a single image layer with the application JAR, Jib's build strategy separates the Java application into multiple layers for more granular incremental builds. When you change your code, only your changes are rebuilt, not your entire application. These layers, by default, are layered on top of an OpenJDK base image, but you can also configure a custom base image. For more information, check out the official blog post or watch this talk (slides).

See also rules_docker for a similar existing container image build tool for the Bazel build system.

Need Help?

A lot of questions are already answered!

For usage questions, please ask them on Stack Overflow.

Privacy

See the Privacy page.

Get involved with the community

We welcome contributions! Here's how you can contribute:

Make sure to follow the Code of Conduct when contributing so we can foster an open and welcoming community.

Disclaimer

This is not an officially supported Google product.

jib (GoogleContainerTools/jib)

Searching Database…

14.5K ·GitHub
What is this?Jib builds optimized Docker and OCI container images for Java applications without needing a Docker daemon or deep Docker expertise.
Is it a plugin, a library, or a CLI tool?All three: it's available as a Maven plugin, a Gradle plugin, a general-purpose Java library (Jib Core), and a command-line interface (Jib CLI).
How do I add it to my build?Add the jib-maven-plugin to your Maven pom.xml or the jib-gradle-plugin to your Gradle build file and follow their quickstart guides; Jib Core can also be used as a library and Jib CLI as a standalone command-line tool.
Do I need a Docker daemon installed first?No, Jib builds and pushes images directly without Docker, so there's no need to write a Dockerfile or have Docker running.
What base image does it use by default?By default Jib layers your app on top of an OpenJDK base image, though a custom base image can be configured instead.
Why is Jib faster than a typical Docker build?Jib splits your application into multiple layers, separating dependencies from classes, so only changed layers need to be rebuilt and redeployed instead of the whole JAR.
Does Jib guarantee reproducible builds?Yes, rebuilding an image with the same contents always generates the same image, avoiding unnecessary redeploys.
Can I use Jib with Spring Boot or multi-module projects?Yes, the examples directory includes Spring Boot, Micronaut, multi-module project, and Spark Java examples.
Does Jib work with Google Cloud Build?Yes, Jib works well with Google Cloud Build, and the README links to a guide on using Jib on Google Cloud Build.
Size
16.5 MB
Stars
14.5K
Age
8y
Commits · 90 Days