Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    PranobSam
    @PranobSam
    Hello i am new to jib and trying to integrate with private gitlab registry
    and facing issue with the as it complain abt gloab config.json
    i even passed -Djib.auth.name and password parameter
    but has not be successful any1 can guide please
    mvn compile jib:build \
    -Djib.to.auth.username=${CI_REGISTRY_USER} \
    -Djib.to.auth.password=${CI_REGISTRY_PASSWORD} \
    -Djib.to.image=${CI_REGISTRY_IMAGE}:latest
    this is what i passed in my gitlab-ci
    34 replies
    dave08
    @dave08
    Hi! I'm using the most recent version of Jib, but I got the error (in the thread):
    7 replies

    It's a multi-module project, the build seems to complete, but when getting to:

    [======                        ] 20.0% complete    
    > building dependencies layer    
    > building project dependencies layer    
    > building classes layer    
    > building resources layer    
    

    it fails

    PranobSam
    @PranobSam
    Hello team i need to create custom labels and pass it to the Image as metadata in gitlab ci, can i pass it as parameter or it has to be only in POM.XML. is there any other way to do that
    1 reply
    ?
    Chanseok Oh
    @chanseokoh

    @/all Jib Build Plugins 3.1.2 released with the following bug fix:

    • Fixed the bug introduced in 3.1 that constructs a wrong Java runtime classpath when two dependencies have the same artifact ID and version but different group IDs. The bug occurs only when using Java 9+ or setting jib.container.expandClasspathDependencies. (GoogleContainerTools/jib#3331)

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

    Ritika Mittal
    @ritika1701
    Hello. I have got a query. In the entry point of jib maven plugin if I give command /bin/bash -c scripts/test.sh and in the extradirectory copy the files. Will the image run. I know it's of no meaning to use jib when I have to run bash script only. But I have a need here.
    2 replies
    Rafal Klys
    @whut
    Is there any benefit of setting jib.applicationCache to some shared dir in Maven? I understand that for Gradle with its incremental build jib can be informed by Gradle that there is no need to build the application layer, so instead it use the cached one. But for what I understand, there is no such feature in Maven, so setting jib.applicationCache does not help with anything, right?
    Rafal Klys
    @whut
    Ok, if I understood this properly (especially the part about selectors), the Jib itself can do cache invalidation, does not need Gradle for that, which means that it works also in Maven
    but it would be good to have some second confirmation:)
    1 reply
    Ritika Mittal
    @ritika1701
    Hello . How can I install jq in docker image built with jib maven plugin.
    1 reply
    Philip Bannon
    @BannonPhilip_twitter
    Hi All, sorry if this has been asked before. Using JIB and cloud run / build where should I be setting my Java applications Xmx settings?
    4 replies
    sineaggi
    @sineaggi:matrix.org
    [m]
    I've been working on a patch that adds chunked upload support to jib here https://github.com/GoogleContainerTools/jib/compare/master...Sineaggi:chunked-uploads When testing I found it worked for gitlab's private registry, but github fails. Also the whole withOffsetAndLength thing is a bit ugly. Thoughts?
    1 reply
    sineaggi
    @sineaggi:matrix.org
    [m]
    @chanseokoh: That's what I was going to work on next, along with potential retries on network error. Figured I'd get some input first.
    sineaggi
    @sineaggi:matrix.org
    [m]
    @chanseokoh: the sole response from github is {"errors":[{"code":"BLOB_UPLOAD_INVALID","message":"blob upload invalid"}]}
    sineaggi
    @sineaggi:matrix.org
    [m]
    ok range on github is perpetually responding with 0-<content-length>, whereas gitlab and local docker registry respond with 0-<total length sent>
    sineaggi
    @sineaggi:matrix.org
    [m]
    github's response is always
    DEBUG org.apache.http.headers - http-outgoing-10 << HTTP/1.1 202 Accepted
    DEBUG org.apache.http.headers - http-outgoing-10 << Content-Length: 0
    DEBUG org.apache.http.headers - http-outgoing-10 << Content-Type: application/json
    DEBUG org.apache.http.headers - http-outgoing-10 << docker-distribution-api-version: registry/2.0
    DEBUG org.apache.http.headers - http-outgoing-10 << range: 0-33
    like it's only accepting and overwriting the first 34 bytes over and over again
    sineaggi
    @sineaggi:matrix.org
    [m]
    Github upload succeeds in two cases: one where all of the data is uploaded in the final put and no patchs are sent (with the current code in the branch) or if all the data is sent in a patch, and then completed with an empty put (simple change to the for loop). Multiple patchs is where I start hitting troubles with github.
    Chanseok Oh
    @chanseokoh
    Hmm... it's concerning that they don't support it. Are you using the legacy docker.pkg.github.com or the new ghcr.io?
    sineaggi
    @sineaggi:matrix.org
    [m]
    Yep for sure the new ghcr.io, authenticated with a personal token. That 34 bytes is arbitrary btw, just the chunk size i was using during testing (these are very small test layers).
    i couldn't find a way to configure the docker cli to push using smaller chunk sizes to test github
    Chanseok Oh
    @chanseokoh
    The chunked upload is nice, but a major repo like ghcr.io doesn't support it, I think we need to be very careful about the implementation.
    sineaggi
    @sineaggi:matrix.org
    [m]
    i was going to report the bug to github unless anybody here saw anything obviously wrong with my code.
    Chanseok Oh
    @chanseokoh
    Yeah yeah maybe you should file a bug.
    12 replies
    ZealousMacwan
    @ZealousMacwan
    I don't want to push image to registry but only to build locally. Can anyone help me with that?
    Charlie Hubbard
    @chubbard
    I just installed jib as a plugin, but I'm getting the following error:
    > No signature of method: build_4hsbqpanwhbni660d2nicy9gi.jib() is applicable for argument types: (build_4hsbqpanwhbni660d2nicy9gi$_run_closure5) values: [build_4hsbqpanwhbni660d2nicy9gi$_run_closure5@1889c7ed] I have a jib {...} closure block to configure the jib task, but it's throwing that error when I refresh the project in Intellij.
    I'm using the latest version 3.1.3
    Charlie Hubbard
    @chubbard
    Nvm it was something else.
    Daniel Zou
    @dzou

    @ZealousMacwan -- Hey, try these instructions for building an image to a local docker daemon with Jib: https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#can-i-build-to-a-local-docker-daemon

    I think this is what you want.

    Cristiano Gavião
    @cvgaviao

    Hello all!
    I had a multi-stage dockerFile where I'm setting up graalvm environment, copying the jars from my project and then building a native image in the first layers, and then copying the resulting artifacts to the last layer.

    Would this kind of building scenario be possible using Jib?

    3 replies
    yverrette
    @yverrette

    I have been using jib on various projects for more than a couple years. Had a problem recently with AWS Fargate where running local version of container on a mac would work fine and running on AWS errored out due to duplicate methods. Somehow the classes load order changed from local container to AWS. Same application had similar issue with just a restart on Fargate where again classes load order failed the application launch (missing method on the core version of a transitive lib version).

    I understand that I can look for duplicate methods and fix this at build time but Spring Boot already has mechanism to enforce class load order through JarLauncher. Is there a mechanism in jib to enforce class load order?

    3 replies
    Cristiano Gavião
    @cvgaviao

    Hi all,
    I was trying to containerize a legacy project where its JAR contains multiple entry points (classes with main() method). All those different classes are called by a scheduler and using a *.sh script.

    But Jib gave me an error because of the multiple valid main classes.

    Is there any way to work around this need to have a single entry point?

    1 reply
    Kyle Rowan
    @karowan
    Hi, is there a way to prefix the default entrypoint? For example I need to inject secrets using something called doppler which can be done by running doppler run -- <command>. What I would like to do is just prefix the default entrypoint with ["doppler", "run", "--"] without completely overwriting the default one. Any help would be appreciated.
    7 replies
    Rohan Rajpal
    @rohanrajpal
    Hey
    I can't seem to set the from property in paths in extraDirectories in the jib gradle plugin
    A problem occurred evaluating project ':tourlandish.aries'.
    > Cannot set the value of read-only property 'from' for extension 'jib' of type com.google.cloud.tools.jib.gradle.JibExtension.
    If anyone can help, would appreciate it a lot
    Rohan Rajpal
    @rohanrajpal
    Nvm it was a silly mistake
    seanleblancicdtech
    @seanleblancicdtech
    i had a question - suppose we are using Java 11, and our application seems to need the java.desktop module? What is the most idiomatic way to add that into the image?
    47 replies
    kent7301
    @kent7301
    Hello
    1 reply
    James Todd
    @jwtodd

    jib via gradle fan/user

    recently migrated from osx docker-desktop to microk8s

    q: is jib publishing to microk8s:registry(containerd) supported? doable?

    thx in advance

    1 reply
    Siddharth Mundada
    @svmundada

    Hi all,
    I am trying to understand the base image cache directory structured specified by -Djib.baseImageCache and how it works.

    bash-5.0$ tree /tmp/baseimage10/
    /tmp/baseimage10/
    -- images
        -- myregistry.jib.com
            -- myrepo
                -- myimage!sha256!mysha
                    |-- lock
                    -- manifests_configs.json

    Where are the actual layers stored?
    Thanks

    3 replies
    NicklasWallgren
    @NicklasWallgren
    Hey, it is possible to build docker images using the docker daemon? We have encountered invalid source release errors, since jib relies on the current installed version of JDK.
    12 replies
    Two4
    @Two4
    I'm encountering a strange error when executing "mvn clean compile jib:dockerBuild" with intelliJ - the build outputs the error C:\Users\(redacted)\AppData\Local\Temp\(long path)\layer.tar: A required privilege is not held by the client.
    30 replies
    Laurensius Bernhard
    @l7777777b

    Hi @/all, I'm struggling to understand, is there any guides on how i can use Jib and cloud build together? thanks

    hi guys, is there any updated preferred way to use jib with gradle on google cloud build? is it possible to use gradlew instead of preinstalled gradle image?

    1 reply
    Clayton Walker
    @Sineaggi
    Does jib currently support per-arch extraDirectories? I'm looking into adding jlink support (which would generate custom jres per arch supported, via the org.beryx.runtime gradle plugin