转载

Jib:谷歌发布的可大大简化 Java App 容器化过程的开源工具

Jib

Jib:谷歌发布的可大大简化 Java App 容器化过程的开源工具

What is Jib?

Jib builds Docker and OCI images for your Java applications and is available as plugins for Maven and Gradle .

Maven : See documentation for jib-maven-plugin .

Gradle : See documentation for jib-gradle-plugin .

Jib as a container-building library for Java is work-in-progress. Watch for updates.

Goals

  • Fast- Deploy your changes fast. Jib separates your application into multiple layers, splitting dependencies from classes. Now you don’t have to wait for Docker to rebuild your entire Java application - just deploy the layers that changed.

  • Reproducible- Rebuilding your container image with the same contents always generates the same image. Never trigger an unnecessary update again.

  • Daemonless- Reduce your CLI dependencies. Build your Docker image from within Maven or Gradle and push to any registry of your choice. No more writing Dockerfiles and calling docker build/push.

Quickstart

Maven

See documentation for using jib-maven-plugin .

Gradle

See documentation for using jib-gradle-plugin .

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 a distroless base image.

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

Frequently Asked Questions (FAQ)

See the Frequently Asked Questions (FAQ) wiki page .

Community

  • Chat with us on gitter
  • jib-users mailing list
原文  https://github.com/GoogleContainerTools/jib
正文到此结束
Loading...