Google’s Jib Allows Developers to Optimize Creation of Docker Containers for Java Apps, Customize Plug-ins for Maven and Gradle
Google has extended its Jib containerization technology for Java applications with the Jib Plugin Extension Framework, enabling customization of the Jib plug-ins for the Maven and Gradle build systems.
Available on GitHub and featuring a variety of extensions, the framework allows developers to tailor Jib to their liking. They could, for example, write an extension adding custom image layers whose contents come from a ZIP file. Developers also could plug in an extension written by someone else and apply it to their own project. Developers could tweak every aspect of an image they want to build.
The Jib containerization framework was first released in June and is powered by the Container Build Plan Specification, a tool-agnostic mechanism to describe how to build a Docker or OCI container image. Google cited possibilities for the framework including:
- Fine-tuning image layers.
- Containerizing GraalVM native images for fast startup.
- Containerizing jlink images for a small footprint.
Google also detailed improved application framework support for Jib, having recently released Maven and Gradle Jib extensions for Spring Boot and Quarkus and a Maven extension for GraalVM.
Jib builds Docker and OCI images for Java applications without a Docker daemon or the need to master Docker best practices. Jib is available as a plug-in for Maven or Gradle and as a Java library. Google says Jib can turn any Java app into a space-efficient, optimized container image. Images are built in a declarative manner and there is no need to install Docker or write script-like Dockerfiles.