Google's Java Containerization Tool 'Jib' Goes GA
- By John K. Waters
The latest version of Google's Jib, an open source tool for containerizing Java applications, the beta release of which the company unveiled last summer, just went GA. Jib is a fast and simple container image builder that consolidates all the steps involved in packaging an app into a container image, and allows developers to build containers using familiar Java tools.
"Last year, we set out to make it easier for developers to containerize their Java applications," wrote Google software engineer Qingyang Chen, in a blog post. "We had noticed that developers were having a hard time with the existing tools. Build times were slow. Dockerfiles were messy. The containers were too large."
Jib 1.0.0 is designed to eliminate the need for deep Docker mastery. It effectively circumvents the need to install Docker, run a Docker daemon, and/or write a Dockerfile.
Jib accomplishes this by separating the Java application into multiple layers for more granular incremental builds. (Traditionally, a Java app is built as a single image layer with the application JAR.) "When you change your code, only your changes are rebuilt, not your entire application," the GitHub page explains. "These layers, by default, are layered on top of a distro-less base image."
Jib 1.0.0 is available as a plugin for Maven and Gradle, and it runs on a general-purpose container-building library for Java (called Jib Core). The library was released with some "API refinements," allowing developers to use Jib "as more than just Maven and Gradle plugins," Chen said. "You can now build containers in Java without a Docker daemon, for any application."
With this release, Jib can also containerize WAR files with no extra configuration. The default app server in the container is Jetty, but it's also possible to use a different server, Chen explained, such as Tomcat.
Jib 1.0.0 is also integrated with the Skaffold command-line tool for continuous development on the Kubernetes container orchestration system. "Skaffold eliminates the tedious steps involved in rebuilding and redeploying your application for every change you make," Chen explained. "Skaffold does this by containerizing your application with Jib and deploying it to your Kubernetes cluster whenever it detects a change. You can now focus on what you really care about -- writing code."
Google is providing samples and Codelabs for deploying a Spring Boot application to Kubernetes or deploying a Micronaut application to Kubernetes. Jib works with most Docker registry providers and hosted registries.
John K. Waters is the editor in chief of a number of Converge360.com sites, with a focus on high-end development, AI and future tech. He's been writing about cutting-edge technologies and culture of Silicon Valley for more than two decades, and he's written more than a dozen books. He also co-scripted the documentary film Silicon Valley: A 100 Year Renaissance, which aired on PBS. He can be reached at firstname.lastname@example.org.