Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Clayton Walker
    @Sineaggi
    Also somewhat related, does distroless generate java 11 arm images?
    2 replies
    seanleblancicdtech
    @seanleblancicdtech
    It seems that Jib is now using AdoptOpenJDK images by default? We were using distroless (up until recently) - since Java 1.17 is LTS and GA now, we are looking around at what we would do to build our images on that - is there a recommended path for this from the Jib team?
    3 replies
    Deepankar Dixit
    @ddixit:matrix.org
    [m]
    for further reference, you can also have a look at this
    1 reply
    zackzack02
    @zackzack02
    Hi guys, is it possible to make jib create a container which has jdk installed ?
    5 replies
    Jure Repe
    @jrepe
    Hey, I was wondering, do you guys have any plans to support building native images with the jib-quarkus-gradle extension? I've noticed in the README that currently this isn't covered.
    18 replies
    seanleblancaticdtech
    @seanleblancaticdtech:matrix.org
    [m]
    Suppose we wanted to set the javaagent inside Gradle with Jib. Is there any way to unset/override this value? Normally, we set this with K8S, and we set up a ConfigMap with the value JAVA_TOOL_OPTIONS containing the -javaagent:/pathtoagent.jar in it. But I'm wondering if we put this into the image directly, I'm wondering if there is a way to override this if we happen to need it?
    seanleblancaticdtech
    @seanleblancaticdtech:matrix.org
    [m]
    Also, from the docs, it seems that arbitrary RUN commands are not supported (or recommended), but is there any way to get soft links to work?
    What I've found is that our APM agent gets updated quite frequently, and so, instead of having to update our codebase and our helm chart to include it, it would be nice to include it via our image build step - for example, the name of original jar: elastic-apm-agent-1.26.0.jar and point to it with a generic soft link like elastic-apm-agent.jar and refer to that for configuration in starting it up.
    seanleblancaticdtech
    @seanleblancaticdtech:matrix.org
    [m]
    Also, I'm taking that since this is not prioritized, that creating soft links in, say, src/main/jib is not supposed to do anything?
    Chanseok Oh
    @chanseokoh
    Let's have a discussion in a thread.
    15 replies
    seanleblancaticdtech
    @seanleblancaticdtech:matrix.org
    [m]
    If Jib ever added softlinks that'd be the ideal of course. are there any future plans to add that?
    Chanseok Oh
    @chanseokoh
    It's certainly a nice feature and still an open issue: https://github.com/GoogleContainerTools/jib/issues/1576#issuecomment-689608855 We don't have it in our current roadmap though. Contributions are highly welcome.
    1 reply
    abdalla-002
    @abdalla-002
    hello
    Pascal LIBENZI
    @pascal.libenzi_gitlab
    Hello! I would like to know if someone already used jib to build an ear package, I guess this is not really supported directly (and I really understand why), but I would like to know if there is another way that using jib to do the equivalent of docker COPY instruction of my ear file...
    Thanks a lot :)
    5 replies
    Sam Lightfoot
    @samlighty_twitter
    Hi guys - we want to have our GC logging write to a directory that isn't /tmp, but all other dirs cannot be written to due to permissions in the container. What's the typical way this would be handled? Is it possible to modify the permissions of a given directory to allow writing? Thanks
    3 replies
    fall14123
    @fall14123
    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
    @beingvg
    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
    @samlighty_twitter
    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
    WesternGun
    @WesternGun

    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.

    WesternGun
    @WesternGun
    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
    @ddixit:matrix.org
    [m]
    Is it working now? @WesternGun
    WesternGun
    @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
    @jvanzyl
    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
    @elefeint
    @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
    @jvanzyl
    @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.
    Appu
    @loosebazooka
    On the faq, there's a link to a tool called dive. That seems to be what you're looking for
    Jason van Zyl
    @jvanzyl
    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
    @cddr
    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
    h-wasmus
    @h-wasmus
    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
    @rrva
    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
    @Kitanotori
    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
    @MSPigl

    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
    @shivamgoel
    It is common for same artifact to be included in both project dependencies and snapshot dependencies ?
    1 reply
    Matthew Pigliavento
    @MSPigl
    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
    fdutton
    @fdutton
    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
    @elefeint
    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.
    Mridula
    @mpeddada1

    @/all Jib CLI 0.10.0 has been released!

    Major Changes

    See CHANGELOG.md for more details.

    matrium0
    @matrium0
    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
    ooxaam
    @ooxaam

    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

    Config:

    <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
    <spring.boot.dependecies.plugin.version>2.5.7</spring.boot.dependecies.plugin.version>
    <spring.boot.maven.plugin.version>2.5.7</spring.boot.maven.plugin.version>
    <spring.cloud-version>2020.0.5</spring.cloud-version>
    <image>ooxaam/${project.artifactId}:${project.version}</image>
    </properties>

        <plugin>
          <groupId>com.google.cloud.tools</groupId>
          <artifactId>jib-maven-plugin</artifactId>
          <version>3.1.4</version>
          <configuration>
            <from>
              <image>eclipse-temurin:17@sha256:2b47a8ea946ce1e5365a1562414ed576e378b7b670cadff3fb98ebecf2890cdc</image>
            </from>
            <to>
              <tags>
                <tag>latest</tag>
              </tags>
            </to>
          </configuration>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>build</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

    Output:

    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"}]}]}

    John Menke
    @jmjava
    is multi-platform-image supported in Jib? Is there. documentation on how to configure?