Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    sineaggi
    @sineaggi:matrix.org
    [m]
    If we don't mind the fields being changed by jackson, the fields could also be made non-final instead
    1 reply
    Dan Millwood
    @danmillwood
    Hello, is it possible with jib-core, to build an OCI image to a local disk cache, and at a later time, push the image from the local disk cache to an image registry, rather than doing the build and push as a single step?
    7 replies
    thomashcampbell
    @thomashcampbell
    I'm trying to understand the point of <volumes><volume> in JIB (Maven). It creates a directory in the image but how is that useful until it is mounted using the docker command "-v"? Point being why not just use "docker -v" to begin with?
    1 reply
    Jover
    @JoverZhang
    Can I put the result of spring-boot-maven-plugin into the jib container?
    1 reply
    James Todd
    @jwtodd

    hi. i'd like to push the image to aws-ecr and as such have configured a credsHelper as the jib docs suggest and am running into the following error, noting the what looks to be typo in the tool name:

    ...The system does not have docker-credential-erc-login CLI

    i have brew installed docker-credential-ecr-login. thoughts?

    1 reply
    Nuwan Sanjeewa Abeysiriwardana
    @nuwansa
    Hi, i'm getting following error with java 15
    Your project is using Java 15 but the base image is for Java 11, perhaps you should configure a Java 15-compatible base image using the '<from><image>' parameter, or set maven-compiler-plugin's '<target>' or '<release>' version to 11 or below in your build configuration
    2 replies
    talfoa
    @talfoa
    hi, I'm running mvn compile - > no changes detected.
    however jib:build keeps pushing an image ,even subsequent calls to jib:build keeps building and pushing an image
    I'm using jib 3.0.0, tried adding a digest to the from image, it removed the warning but still jib pushes the image.
    from debugging I can see jib mostly skips pushing but sometime it does push,
    e.g: Pushing container configuration
    [DEBUG] TIMING Pushing BLOB digest: sha256:421a640eac902e271f90912cfc98a9be9b7667a23d0d1b22efbd76dc94318279, size: 6252
    TIMED Pushing container configuration : 833.0 ms
    [DEBUG] TIMING Preparing manifest pushers
    [DEBUG] TIMED Preparing manifest pushers : 4.0 ms
    [DEBUG] TIMING Pushing manifest
    ultimately I want to skip the push if there were no code changes,
    thanks for any help
    7 replies
    Robert Macaulay
    @taer
    Quick question about jib pushing to ECR. I'm hitting the exact same error as this: https://github.com/GoogleContainerTools/jib/issues/3215#issuecomment-827585438 which is Registry may not support pushing OCI Manifest or Docker Image Manifest Version 2, Schema 2 The reason is we have tag immutability turned on in ECR.
    We don't want to drop that immutability, so is there a way for jib to push to ecr w/out mutating the tags as it goes?
    Robert Macaulay
    @taer
    Or.. Is there an extension that would couple with the jibDockerBuild task to do a push? The setup I have now is ./gradlew jibDockerBuild and then a shell script that runs a docker push builtIimageName which pushes to ECR. it would be kinda nice to have a jibDockerPush which would just run docker push on whatever the jibDockerBuild task built.
    1 reply
    Aleksandra Nowak
    @olanowak
    Hi! Does anyone have expierience with building jib based projects with Gitlab? I have only "Docker" executors available and there is an error :
    [ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:1.6.1:dockerBuild (build-local-image) on project oai-identifiers-harvester: Build to Docker daemon failed, perhaps you should make sure Docker is installed and you have correct privileges to run it -> [Help 1]
    2 replies
    Sabrina Peoples
    @peoples_sabrina_twitter
    Hi, i've been using jib with amazoncorretto:11 with AWS ECR successfully for a few months now, but all of a sudden i have a problem. I'm using a specific digest because i'm i need the arm architecture. I have different environments. I've used a sha256 in develop, it worked, then later when i went to staging in a different AWS account it failed because the sha changed. So i've switched the sha to the latest one found today when doing a docker inspect. Then when using jib i can see it fails in the logs and tried using another sha, not the one i specified in from.image. This other sha doesnt exist in the registry.
    3 replies
    Ryan Schachte
    @Schachte
    Hey guys. Getting this issue: "but failed because: Registry may not support pushing OCI Manifest or Docker Image Manifest Version 2, Schema 2". I'm using gradle, the format is Docker, not OCI. This is underneath the Container closure in Gradle. Am I missing something obvious?
    2 replies
    Stephan H. Wissel
    @Stwissel

    Trouble overwriting a file from a base image.
    I have the following snippet in my maven pom:

    <extraDirectories>
       <paths>
           <from>src/main/docker/sysconfig</from>
        <into>/etc/sysconfig</into>
       </paths>
    </extraDirectories>

    The directory sysconfig exists in my base image. No files are copied. What do I miss?

    1 reply
    Chanseok Oh
    @chanseokoh
    Try <paths><path><from>.... It is likely that /etc/config is recognized as another extra directory. (Maven ignores an XML element name for a list configuration.)
    Ian Davidson
    @iandavidson

    Hello, is there a way to provide a command line argument in order to forgo a property defined?

    For jib on my local machine, I use: jib.to.credHelper=osxkeychain.

    But for building/publishing in CI environment, I want to use specific credentials, while omitting property defined at jib.to.credHelper. Is this possible?

    5 replies
    Prathamesh
    @im-pratham
    Hi, my base image has USER directive, and I create target image with extraDirecties configuration. I can see target files are owned by root. Is that intentional? What will be best practice to put executable file in image and own by non-root user?
    4 replies
    Chanseok Oh
    @chanseokoh

    Jib Build Plugins 3.1.0 Release

    Major Changes

    • For Google Artifact Registry (*-docker.pkg.dev), Jib now tries Google Application Default Credentials last like it has been doing for gcr.io. (GoogleContainerTools/jib#3241)
    • Jib now creates an additional layer that contains two small text files: /app/jib-classpath-file and /app/jib-main-class-file. They hold, respectively, the final Java runtime classpath and the main class computed by Jib that are suitable for app execution on JVM. For example, with Java 9+, setting the container entrypoint to java --class-path @/app/jib-classpath-file @/app/jib-main-class-file will work to start the app. (This is basically the default entrypoint set by Jib when the entrypoint is not explicitly configured by the user.) The files are always generated whether Java 8 or 9+, or whether jib.container.entrypoint is explicitly configured. The files can be helpful especially when setting a custom entrypoint for a shell script that needs to get the classpath and the main class computed by Jib, or for GoogleContainerTools/jib#2471. (GoogleContainerTools/jib#3280)
    • For Java 9+ apps, the default Java runtime classpath explicitly lists all the app dependencies, preserving the dependency loading order declared by Gradle. This is done by changing the default entrypoint to use the new classpath JVM argument file (basically java -cp @/app/jib-classpath-file). As such, jib.container.expandClasspathDependencies takes no effect for Java 9+. (GoogleContainerTools/jib#3280)
    • Timestamps of file entries in a tarball built with jibBuildTar are set to the epoch, making the tarball reproducible. (GoogleContainerTools/jib#3158)
    • (Gradle) Added lazy evaluation for jib.container.labels using Gradle Property and Provider. (GoogleContainerTools/jib#3242)
    See CHANGELOG.md (Maven / Gradle) for more details.
    Chanseok Oh
    @chanseokoh
    We released Jib build plugins 3.1.1 with the following hotfix:
    • Fixed the regression introduced in 3.1.0 where a build may fail due to an error from main class inference even if jib.container.entrypoint is configured. (GoogleContainerTools/jib#3295)
    Mridula
    @mpeddada1

    @/all Jib Core 0.19.0 has been released!

    Major Changes for Jib Core

    • JavaContainerBuilder#fromDistroless() and JavaContainerBuilder#fromDistrolessJetty() are deprecated. To migrate, check the Javadoc. (GoogleContainerTools/jib#3123)
    • Timestamps of file entries in a built TarImage are set to the epoch, making the tarball reproducible. (GoogleContainerTools/jib#3158)

    See CHANGELOG.md (Jib Core) for more details.

    Philip Bannon
    @BannonPhilip_twitter
    Hi @/all, I'm struggling to understand, is there any guides on how i can use Jib and cloud build together? thanks
    17 replies
    Ryan Schachte
    @Schachte
    Hey team. Trying to copy a config file from my repo into my custom image I'm building with Jib. I'm using Gradle. Any chance someone can point me in the right direction?
    3 replies
    Mridula
    @mpeddada1

    @/all Jib CLI 0.7.0 has been released!
    Major Changes

    • Added the war command which can be used to containerize a standard WAR with $ jib war --target ... my-app.war. The command will explode out the contents of the WAR into optimized layers on the container. (GoogleContainerTools/jib#3285)

    See CHANGELOG.md for more details.

    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?