Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    hi, curious if windows container build would be supported by jib. i understand as of 2020 Feb windows container image build is not supported, according to https://github.com/GoogleContainerTools/jib/issues/2215#issuecomment-571795771 thx
    2 replies
    Vaibhav Gupta
    Hey, Is there any way to pass runtime argument to java via jib-gradle-plugin?
    1 reply
    Also been trying to run a script in the container as after the classpath files copied but can only use entry point to run the script which is not working because it throws error because no files are copied to the path.
    1 reply
    Sam Lightfoot
    Hi - we are seeing 'java executable file not found in $PATH' after adding an initContainer in GKP - I'm not entirely sure where to start with debugging this. Does anyone have any ideas? We are mounting the initContainer (appdynamics) to /opt.
    1 reply

    Hi jib team, thanks for the plugin for Maven, like it; I am using the buildTar task, and find this error message:

     Caused by: java.nio.file.NoSuchFileException: /tmp/2158944339627963675/manifest.json
        at com.google.cloud.tools.jib.builder.steps.LocalBaseImageSteps.cacheDockerImageTar (LocalBaseImageSteps.java:217)

    When I want to read a tarball in <from>.
    The image I downloaded is registry.access.redhat.com/jboss-amq-6/amq63-openshift:1.4-44. I want to docker save it to a tar, extract it, enter each layer and remove some class file, and package it again as a tarball, and build my app with buildTar. But I failed with this error. (Yes, I do this because I need to remove some log4j class files).

    Do you think it's the proper way? What did I do wrong? Thanks. Plugin version 3.0.0, command: mvn clean package jib:buildTar -U -f pom.xml -P docker-build -X. Maven is using Java 8.

    OK I realized that tar will include a default root dir . in the tarball, so the path are screwed; I had to change the way it packages so that only the layers are included, not .. Now it's fine.... partially.
    Deepankar Dixit
    Is it working now? @WesternGun
    @ddixit:matrix.org Yes it's working now. I have to use tar in another way to create the tarball, but jib works.
    And jib expects no compression of the tar, in the source code it uses no-compress inputstream; so cannot be compressed in any way: no -z(zip), -b(bzip) or -j when using tar.
    Jason van Zyl
    Hi, is it possible using JIB to retrieve and images and walk through the layers inspecting them? If so is there any example code or tests anywhere I can start with?
    Elena Felder
    @jvanzyl Not with Jib, but there are other tools for the purpose -- https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#how-can-i-inspect-the-image-jib-built
    Jason van Zyl
    @elefeint It doesn't have to be something directly available right now, but if the bits and pieces are there I don't mind playing around.
    On the faq, there's a link to a tool called dive. That seems to be what you're looking for
    Jason van Zyl
    Dive is great and I use it, but I'm looking to implement a tool to scan all the layers in an image and I'd prefer to do it in Java as I care predominantly about artifacts in Maven Central for which I have a large number of tools that are already in Java.
    Andy Chambers
    Hi folks, I'm wondering if what I'm attempting to do is possible at the moment. I have a inherited a project with uses jib to build a docker image with a java project on it. I also have a shiny new m1. When I build the project without any changes, I end up with an image based on linux/amd that runs very slowly on my mac which I'm assuming might be due to the mis-matching architectures. Is there anything I can alter to get the build to produce an image that works better on my m1?
    I did try updating the base image in build.gradle to arm64v8/openjdk:8 (I know that's a really old jdk, but that's what I'm stuck with in this case), but this resulted in the following error
    Caused by: com.google.cloud.tools.jib.image.json.UnlistedPlatformInManifestListException: arm64v8/openjdk:8 is a manifest list, but the list does not contain an image for architecture=amd64, os=linux. If your intention was to specify a platform for your image, see https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#how-do-i-specify-a-platform-in-the-manifest-list-or-oci-index-of-a-base-image
    1 reply
    Hi all, with this Issue: GoogleContainerTools/jib#3542 extraDirectories now have to be present while running the jib plugin. I have some directories which might be generated during the build process (depending on the situation). How can we deal with such situation? Checking for the existence of the file does not work since the extraDirectories setting is evaluated during the Configuration Stage of the plugin, when the directory is not present yet.
    3 replies
    Ragnar Rova
    If I would like to produce two docker images, where simply the mainclass differs, how do I create two different gradle tasks where the second task can inherit all the configuration from the first?
    1 reply
    Petri Kivikangas
    I'm using Rancher Desktop locally with containerd (no Docker installed). Is it possible to build image to local registry using jib? e.g. ./gradlew jibDockerBuild expects Docker daemon, which I don't have.
    8 replies
    Matthew Pigliavento

    Hello! I'm trying to execute ./gradlew build jibDockerBuild for a Spring Boot app written in Kotlin, targeting Java 11, via the Jib Gradle plugin v3.2.0 (I'm on macOS 12.2).

    When I attempt to execute the Gradle task, I encounter the following error: com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: Cannot run program "docker": error=2, No such file or directory

    I haven't seen a ton of other people with this same issue, and the response I've seen to those few occurrences is that the Docker CLI isn't installed. However, I do have Docker installed (via Docker Desktop for Mac), and the "docker" command is recognized in the same terminal that I attempt to execute the Gradle task in. So I definitely have Docker installed, it just seems like Jib doesn't recognize my PATH.

    Any ideas would be appreciated. Thanks!

    3 replies
    Shivam Goel
    It is common for same artifact to be included in both project dependencies and snapshot dependencies ?
    1 reply
    Matthew Pigliavento
    Is there a way to download a file from a URL into the image generated by the Jib Gradle plugin (like an ADD command in a Dockerfile)?
    2 replies
    What is the release cadence for incorporating upstream changes? I would like to configure a periodic build of containers that do not change very often to keep the number of CVEs to a minimum.
    3 replies
    Elena Felder
    Released this week: jib-maven-plugin v3.2.1, jib-gradle-plugin v3.2.1, jib-core v0.21.0, jib-layer-filter-extension-maven v0.3.0, jib-layer-filter-extension-gradle v0.3.0. Release notes in respective CHANGELOG files and Github releases.

    @/all Jib CLI 0.10.0 has been released!

    Major Changes

    See CHANGELOG.md for more details.

    Hey, I:
    Hey, I've seen that jib moved away from distroless with 3.x, but I can't seem to find the reasoning behind this.
    Can someone explain to me why exactly they moved away from the distroless base-image and whether it still is a valid choice in 2022, let's say for Java 17? Best regards
    3 replies

    Hi Fellows,

    I'm trying to pull eclipse-temurin image, but I'm getting 401 error - Unauthorized for registry-1.docker.io/library/eclipse-temurin: 401





    Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.1.4:build (default) on project customer: com.google.cloud.tools.jib.api.RegistryUnauthorizedException: Unauthorized for registry-1.docker.io/library/eclipse-temurin: 401 Unauthorized
    [ERROR] {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Class":"","Name":"library/eclipse-temurin","Action":"pull"}]}]}

    2 replies
    John Menke
    is multi-platform-image supported in Jib? Is there. documentation on how to configure?
    1 reply
    Oliver Weiler
    Hi! When building a Spring Boot project with Gradle via ./gradlew check, what are the folders I would need to store in my CI pipeline to use the build output in the next step?
    2 replies
    any recommended patterns/examples for having a gradle build step and a separate image build step via jib in a GitLab CI pipeline definition? Would like to separate the concerns of building/testing the code and building the image (which only depends on compilation/packaging), but would be doing some work twice (the compilation). Curious if there is a recommended way to avoid the redundancy with 2 CI jobs, or if ppl typically just combine them all into one job by having tasks.build.dependsOn(tasks.jib)
    4 replies
    Agus Santoso
    small changes in one java class does not picked up by jib. how do i invalidate single java file and force rebuild ?
    1 reply
    one issue is that only after certain time (5 min) has lapsed then small changes in one java class gets picked up by jib.
    Peter vR
    it seems that "docker://xxx/yyy:tag" isn't supported anymore for the from image, is there a way to use an image in the local daemon as base image?
    1 reply
    Philipp Kraus

    Hello I'm new with jib plugin, but I have got a full running local registry with HTTP, so I have enabled insecure registry, but where I need to put that my credentials should send without HTTPS, my current config does not seem to work


    The tag <sendCredentialsOverHttp> seems not to be on the right place but does not work in auth as well. I get the issue Unable to parse configuration of mojo com.google.cloud.tools:jib-maven-plugin:3.2.1:build for parameter sendCredentialsOverHttp: Cannot find 'sendCredentialsOverHttp' in class com.google.cloud.tools.jib.maven.JibPluginConfiguration$ToAuthConfiguration

    3 replies
    Philipp Kraus

    Hello, how can I copy a single file into a directory which contains files. I try to use this


    But this overwrite the whole /app directory, my app directory contains based on the based docker image some existing files. The goal is copy a single file into an existing target directory, without overwriting the target directory

    Philipp Kraus
    Is it possible to disable the whole building process of the /app directory, because in my case I would like to build a spark image, so Jib copies additional stuff to the container and I did not want this. In my case I would like to build my jar and copy the jar by an extraDirectory to my container and also some additional dependency jar files. So I would like to keep everything as it is in my base image and copy some files only to the container.
    Eldo Joseph
    Is it possible to scan images, build by jib before get pushed to registry.