Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    ushaduddu1
    @ushaduddu1
    2.1.0 with version 2.1.0 its failing
    @chanseokoh @ushaduddu1
    Unable to parse configuration of mojo com.google.cloud.tools:jib-maven-plugin:2.1.0:build for parameter paths: Basic element 'path' must not contain child elements -> [Help 1]
    which version of jib? with 2.1.0 its failing with above mvn error
    ushaduddu1
    @ushaduddu1
    image.png
    NVM its working in latest version.. @chanseokoh . thanks for commenting
    Chanseok Oh
    @chanseokoh
    @ushaduddu1 can you try Jib 2.5.2? 2.1.0 is pretty old.
    Stas Chern
    @staswiner

    Hi, i am trying to use Jib on an offline setup.
    uppon running gradle jib i receive the error "Execution failed for task ':jib'.

    com.google.common.collect.ImmutableList.toImmutableList()Ljava/util/stream/Collector;"
    A quick search shows that my guava should be of a proper version, but i took all my dependencies from a hello-world example project, and as such i have no real direction.
    JIB version: 2.5.0

    and guava version 23.6-jre
    thanks for help in advance!
    Chanseok Oh
    @chanseokoh
    @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
    @staswiner
    @chanseokoh thank you very much kind sir! This was indeed the issue.
    Wlad
    @wlad
    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
    Wlad
    @wlad
    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
    @choudh2011
    @chanseokoh thank you for your response.
    danmillwood
    @danmillwood
    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
    @jtgasper3

    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
    @chanseokoh
    @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
    @chanseokoh
    :(
    John Gasper
    @jtgasper3
    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
    @jtgasper3
    @chanseokoh I can open an issue. Just want to ensure you haven't started to writing it up.
    Chanseok Oh
    @chanseokoh
    I appreciate it.
    Álvaro Sánchez-Mariscal
    @alvarosanchez
    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
    Mridula
    @mpeddada1

    @/all Jib 2.6.0 has been released!

    Major Changes for Plugins

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

    dsmclaughlin
    @dsmclaughlin
    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
    @sta-szek
    Hi, is there possibility to generate Dockerfile to some file? i cannot find in docs, i am using maven plugin
    Álvaro Sánchez-Mariscal
    @alvarosanchez
    It's not possible
    Appu
    @loosebazooka
    no, but there are other tools to generate docker files
    Kobi Bar Hanin
    @kobibarhanin
    Hi! I’ve built an interactive git cli - igit. Check it out: https://github.com/kobibarhanin/igit to install: pip install igit
    seanleblancicdtech
    @seanleblancicdtech
    where is the best place to check for all the sha256 hashes to put into annotations like:
    1 reply
    Lukáš Vasek
    @bilak
    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
    <plugin>
      <groupId>com.google.cloud.tools</groupId>
      <artifactId>jib-maven-plugin</artifactId>
      <executions>
        <execution>
          <id>liquibase</id>
          <phase>package</phase>
          <goals>
            <goal>dockerBuild</goal>
          </goals>
          <configuration>
            <extraDirectories>
              <paths>
                <path>
                  <from>src/main/resources/db</from>
                  <into>/liquibase/changelog/db</into>
                </path>
              </paths>
            </extraDirectories>
            <container>
              <entrypoint>INHERIT</entrypoint>
            </container>
            <from>
              <image>liquibase/liquibase:3.10</image>
            </from>
            <to>
              <image>liquibase-custom-batching-demo</image>
            </to>        
          </configuration>
        </execution>
      </executions>
    </plugin>
    Chanseok Oh
    @chanseokoh
    @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
    @bilak
    @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
    @chanseokoh
    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
    @bilak
    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
    @chanseokoh
    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
    @bilak
    @chanseokoh this works. Thanks!
    <pluginExtensions>
      <pluginExtension>
        <implementation>com.google.cloud.tools.jib.maven.extension.layerfilter.JibLayerFilterExtension</implementation>
        <configuration implementation="com.google.cloud.tools.jib.maven.extension.layerfilter.Configuration">
          <filters>
            <!-- exclude application -->
            <filter>
              <glob>/app/**</glob>
            </filter>
          </filters>
        </configuration>
      </pluginExtension>
    </pluginExtensions>
    Iain White
    @icewhite
    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
    @chanseokoh
    @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.
    https://medium.com/@satyajit.nalavade/make-jar-not-war-josh-long-d6ce5fbb8a23#:~:text='%20%E2%80%94%20Josh%20Long,-Satyajit%20Nalavade
    https://medium.com/@compuhosny/make-jar-not-war-ef042a875ed
    Shashank Bellary
    @shashankbellary
    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ı
    @Hmerac
    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
    @bilak
    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
    @manuelarte

    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
    @chanseokoh

    @/all Jib 2.7.0 has been released!

    Major Changes

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

    Romain Ourgorry
    @romainourgorry
    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
    @jeroenlanckmans
    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.
    https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/#packaging-executable-wars-deployable
    10 replies
    Stef Daems
    @stefdaems
    After jib build the new docker image, I want to run it, but it immediately crashes messaging
    6 replies