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
这是什么?Jib 可以为 Java 应用构建经过优化的 Docker 和 OCI 容器镜像,无需 Docker 守护进程,也不需要深入掌握 Docker。
它是插件、库还是命令行工具?三者都是:它以 Maven 插件、Gradle 插件、通用 Java 库(Jib Core)和命令行工具(Jib CLI)等多种形式提供。
我该如何把它加入我的构建?将 jib-maven-plugin 添加到 Maven 的 pom.xml,或将 jib-gradle-plugin 添加到 Gradle 构建文件,并按照它们的快速入门指南操作;Jib Core 也可以作为库使用,Jib CLI 则可以作为独立的命令行工具使用。
我需要先安装 Docker 守护进程吗?不需要。Jib 无需 Docker 即可直接构建和推送镜像,因此既不必编写 Dockerfile,也不必运行 Docker。
它默认使用哪个基础镜像?默认情况下,Jib 会把你的应用分层放在 OpenJDK 基础镜像之上,不过也可以改为配置自定义的基础镜像。
为什么 Jib 比一般的 Docker 构建更快?Jib 会把应用拆分成多个层,将依赖项与类文件分开,因此只需重新构建和部署发生变化的层,而不必整个 JAR 都重来一遍。
Jib 能保证可复现构建吗?能。用相同内容重新构建镜像,总会生成相同的镜像,从而避免不必要的重新部署。
我能在 Spring Boot 或多模块项目中使用 Jib 吗?可以。examples 目录中包含 Spring Boot、Micronaut、多模块项目和 Spark Java 的示例。
Jib 能与 Google Cloud Build 一起使用吗?可以。Jib 与 Google Cloud Build 配合良好,README 中还链接了一份关于在 Google Cloud Build 上使用 Jib 的指南。
Size
16.5 MB
Stars
14.5K
Age
8y
Commits · 90 Days