Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Stas Chern
    and guava version 23.6-jre
    thanks for help in advance!
    Chanseok Oh
    @staswiner it is a multi-module project, right? Your project setup isn't correct. See this FAQ to understand how to properly set up a multimodule project.
    Stas Chern
    @chanseokoh thank you very much kind sir! This was indeed the issue.
    Hi, I'm new to Jib and have question. I have a multi module spring boot project that requires an DB be running to successfully build the application. e.g. I have to first start a properly configured PostgreSQL DB (either natively installed or as a docker container) for mvn clean package to succeed. Can I use Jib in such scenario?
    7 replies
    Does mvn package jib:dockerBuild in contrast tomvn package jib:build mean that resulting image is not pushed to DockerHub registry?
    1 reply
    Kino Chou
    @chanseokoh thank you for your response.
    Hello, Im using jib core to build an image from scratch. e.g.
    Jib.fromScratch() .addLayer(Arrays.asList(Paths.get("helloworld.sh")), AbsoluteUnixPath.get("/")) .setEntrypoint("sh", "/helloworld.sh") .containerize( Containerizer.to(RegistryImage.named("hello-from-jib") .addCredential(args[0], args[1])));
    I need the image to have a different architecture and os than the defaults of amd64 and linux. I can't find any methods to set these. Is there a way that Im failing to see? Thanks
    2 replies
    John Gasper

    Hi all, I'm wondering if anyone has confirmed that the jib-gradle-plugin actually works when building a non-linux/amd64 image?

    from {
            image = "amazoncorretto:11"
            platforms {
                platform {
                    architecture = 'arm64'
                    os = 'linux'

    cause a response:
    > multi-platform image building is not yet supported

    The gradle plugin docs implies that more than 1 platform is permitted, but that is clearly not the case, so I'm wondering if this a disconnect between the two "teams".
    Chanseok Oh
    @jtgasper3 multi-platform image building is currently blocked until we sort out some lingering issues. However, your configuration should work, since you are defining only one platform. So I don't get how you are hitting the error.
    Let me try to reproduce this locally.
    I can reproduce this. It's a bug. The config currently results in two platforms "amd64" and "arm64". So that's why you're getting the error.
    Chanseok Oh
    John Gasper
    Thanks for confirming. I'm not a gradle internals dev, but I'm assuming this gets invoked regardless of if I try to override it in the config or not: https://github.com/GoogleContainerTools/jib/blob/master/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BaseImageParameters.java#L48
    John Gasper
    @chanseokoh I can open an issue. Just want to ensure you haven't started to writing it up.
    Chanseok Oh
    I appreciate it.
    Álvaro Sánchez-Mariscal
    Hi! :wave:
    I'm Álvaro, from the Micronaut team. We are looking to integrate Jib into our Micronaut Maven plugin. I'm working on a PoC by implementing an extension, and have some questions about it
    2 replies

    @/all Jib 2.6.0 has been released!

    Major Changes for Plugins

    See CHANGELOG.md (Maven / Gradle) for more details.

    Hi! I'm new not Jib and google cloud. I'm following the getting started guide here https://cloud.google.com/java/getting-started it asks me to

    "Build the image using Jib:
    mvn package jib:build -Dimage gcr.io/PROJECT_ID/bookshelf
    Replace PROJECT_ID with the Google Cloud project ID that you created."

    however, I get the error "[ERROR] Unknown lifecycle phase "gcr.io/getting-started-292422/bookshelf.... [more stuff] ".

    Can anyone point me in the right direction of the place to ask questions to someone who can help me understand this? Thanks! :)
    7 replies
    Piotr Joński
    Hi, is there possibility to generate Dockerfile to some file? i cannot find in docs, i am using maven plugin
    Álvaro Sánchez-Mariscal
    It's not possible
    no, but there are other tools to generate docker files
    Kobi Bar Hanin
    Hi! I’ve built an interactive git cli - igit. Check it out: https://github.com/kobibarhanin/igit to install: pip install igit
    where is the best place to check for all the sha256 hashes to put into annotations like:
    1 reply
    Lukáš Vasek
    Hi, probably asked many times... We have container that is created with jib which is spring boot java application. This is working perfectly. But now, we need to create another container that will execute database migration as job before deployment (as helm hook). For that I'd like to exclude all java stuff from that container to have it smaller and extend the liquibase image. Is it possible to exclude everything that is being included in /app folder inide container? This is wat I have so far
    Chanseok Oh
    @bilak from what I understand, Jib isn't designed for your use case (it's for containerizing Java apps as part of Maven builds). However, Jib has an extension mechanism, and we have a Jib Layer-Filter extension, with which you can remove files. (But you need to understand your workflow is not what Jib is intended for.)
    Lukáš Vasek
    @chanseokoh I understand, but it would be very usefull if it basically suports this. Nowadays when there is kubernetes around each corner and we are building a lot of containers (not just java) this would be super helpful
    Chanseok Oh
    For the workflow like this, I think Jib CLI which we are working on releasing by EOY may be a better fit. Jib CLI is a general image building tool you can run on the command-line. But for now, perhaps you can use the extension if you want.
    Lukáš Vasek
    Ok thank you very much, I'll try and come back later if I find some issue. Btw would there be also some maven wrapper for jib cli?
    Chanseok Oh
    I don't think we'll have any wrapper around Jib CLI. Maybe Maven already has a plugin to run an arbitrary process?
    Lukáš Vasek
    @chanseokoh this works. Thanks!
        <configuration implementation="com.google.cloud.tools.jib.maven.extension.layerfilter.Configuration">
            <!-- exclude application -->
    Iain White
    Can anyone help me with examples of a Spring Boot Maven WAR built and deployed to an image, running in embedded Tomcat (or non-embedded if that's better). I've been trying for days and getting loads of errors getting it running in docker, and I'm not finding much guidance on stack overflow. BTW, seen this already. Can't get any combination of things to work. Any help would be hugely appreciated.
    Chanseok Oh
    @icewhite I strongly recommend going for non-WAR (hence running in embedded Tomcat or Jetty). WAR is like a legacy app in the days resources were expensive where you needed to run multiple WARs on a single application server. The model doesn't fit well with containers these days. Just remove <packaging>war from pom.xml and switch it to a JAR project.
    Shashank Bellary
    Hello, can any one help me with this? I need to customize jibDockerBuild, what kind of task is jibDockerBuild and how to figure that out
    14 replies
    Mert Açıkportalı
    Hey hey :wave:
    We're using jib to containerize our apps and I just realized that using jib with gradle doesn't execute tasks that are not default(compileJava, classes, jar, jib). Is that right? Because gradle jib doesn't fail when tests are failing. Do I need to run gradle build before I use gradle jib to make sure that tests succeed?
    I couldn't see anything like this and I wanted to confirm.
    4 replies
    Lukáš Vasek
    Hello, what about multistep build ...is that somehow possible with jib? I'm looking into openj9 and it's class sharing but that would require me to use openj9 on each developer machine or do some multistep build. I would rather use multi step, but don't think that's supported by jib currently. Is it?
    7 replies
    Manuel Doncel Martos

    Hi, when using gradle jib in Circleci I get the following error. any idea?


    • What went wrong:
      Execution failed for task ':jib'.

      com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: com.google.cloud.tools.jib.api.RegistryUnauthorizedException: Unauthorized for registry-1.docker.io/library/openjdk`

    21 replies
    Chanseok Oh

    @/all Jib 2.7.0 has been released!

    Major Changes

    See CHANGELOG.md (Maven / Gradle) for more details.

    Romain Ourgorry
    Hi everyone!
    I'm using gradle Jib and I would like to exclude/ignore some files from my project resources when I build the image with JIB, is it possible? I didn't find how to do it.
    Please help me :)
    1 reply
    Jeroen Lanckmans
    Hi, I created a springboot war in such a way it is also possible to run it using java -jar. Is it now possible to create a jib image that doesn't use an application server? I have the war plugin enabled.
    10 replies
    Stef Daems
    After jib build the new docker image, I want to run it, but it immediately crashes messaging
    6 replies
    Álvaro Sánchez-Mariscal
    Hi. After running gcloud auth configure-docker, all Jib commands are failing with:
    16 replies
    how to using the docker --link, or network in jib:dockerBuild mode ?
    i check the pom.xml is support the <container> <configuration> <extraDirectories>, no network settings , could somebody help me?
    1 reply
    Petr H.
    Hi, I have a multi-module Gradle project written in Kotlin using Spring Boot. Is there a feasible way how to build a single Docker image using Jib?
    I saw a multi-module example but it creates several images which is not what I want. I have Spring Boot application (usually run as java -jar myApp.jar), divided into Gradle subprojects for better maintainability, but it is still a single app that needs to be in a single container, not separate microservices. Thanks for all hints.
    9 replies
    Hello, I'm new to jib and have read the documentation, it is unclear if the maven jib plugin supports the maven release plugin, I can't seem to get it working. Can anyone help or link me to an example?
    10 replies

    @/all Jib 2.7.1 is released!

    Major Changes