Google Releases Open Source Tool to Containerize Java App Deployments

Jib ostensibly will make it much easier for organizations to deploy and control Java apps across use case deployments.


Google wants to make it easier for Java developers to containerize their applications.

The company this week announced Jib, an open-source Java tool that it says will enable developers to build Java containers more easily using tools with which they are already familiar.

In a blog post July 9, Google software engineers Appu Goundan and Qingyang Chen described Jib as a container image builder designed to handle all the steps involved in packaging a Java application into a container.

"Containerizing a Java application is no simple task," Goundan and Chen wrote. "You have to write a Dockerfile, run a Docker daemon as root, wait for builds to complete, and finally push the image to a remote registry."

New Tool Cuts Down Prep Work

Jib essentially eliminates these requirements. It is implemented in Java and is directly integrated with the Maven and Gradle Java development environment, the two Google engineers said. So developers can put Java apps into containers in little time without having to worry about maintaining a Dockerfile with instructions for building a container image or creating a Java Archive (JAR) for all the files associated with an application.

"Since Jib tightly integrates with your Java build, it has access to all the necessary information to package your application," Goundan and Chen wrote.

Jib also takes advantage of techniques such as registry caching and image layering to speed up the time it takes to release incremental software changes to production. That's because Jib can organize an application into distinct layers and only rebuilds the layers that have changed. When changes are made to code, Jib ensures that only the changes are rebuilt. For example, any change in application dependencies or application resources will result in Jib pushing out changes to only those layers instead of to the whole application.

Can Use Declarative Language

Jib also allows application developers to use declarative language to build container images from Maven and Gradle metadata, the two Google engineers said.

Container technology allows software developers to build, deploy and run applications in virtual machine-like environments that are independent of the underlying infrastructure on which they are running.

The goal with container technology is to give application developers a way to write applications once, and have it run everywhere without having to worry about the underlying hardware or the software infrastructure.

Jib, is designed to alleviate the many challenges associated with containerizing a Java application. It is available as a plugin for Maven and Gradle and developers can use it with minimal configuration changes, Goundan and Chen said. All that developers have to do to use it is to add the plugin and configure the target.

Google has released Jib code to GitHub and is encouraging developers to use it to accelerate Java development in container environments.

Jaikumar Vijayan

Jaikumar Vijayan

Vijayan is an award-winning independent journalist and tech content creation specialist covering data security and privacy, business intelligence, big data and data analytics.