Skip to content

Building a Container with Jib


Docker requires permissions to install a service running as a daemon, which is a privileged process in your operating system. Nowadays, there are also dockerless solutions available for developers, such as Jib.

Jib is an open-source framework for Java made by Google, which can build OCI-compliant container images without the need for Docker or any container runtime. Jib comes as a library that Java developers can import into their Maven or Gradle projects. This means you can create a container image for your app without writing or maintaining any Dockerfiles, delegating this complexity to Jib.

Using Jib

The easiest way to start building a container image with Jib on an existing Maven project is to add the plug-in via the command line:

mvn compile -Dimage=<MY IMAGE>

Alternatively, you can add Jib as a plug-in to your pom.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""
  <relativePath/> <!-- lookup parent from repository -->
 <description>Demo project for Spring Boot</description>




To create a container image without using Docker and push it directly to a container registry, run the following command. In this example, we will use and store the container image at You will need to provide your registry credentials:

mvn compile \ \<USERNAME> \<PASSWORD>


Containerization has become an essential part of modern software development, and Jib has made the process of building and deploying container images simpler and more efficient. With the introduction of the Dockerless Jib plugin, developers can now build and deploy container images without the need for Docker, saving time and resources. The future of containerization is undoubtedly exciting, and Dockerless Jib is leading the way.


  • GitOps Cookbook by Natale Vinto and Alex Soto Bueno