Chat directly with the team! (What do you like best about Jib? What needs to be improved? Please tell us by taking a one-minute survey: https://forms.gle/YRFeamGj51xmgnx28)
/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>
<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>
<packaging>war
from pom.xml
and switch it to a JAR project.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?Hi, when using gradle jib in Circleci I get the following error. any idea?
`
com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: com.google.cloud.tools.jib.api.RegistryUnauthorizedException: Unauthorized for registry-1.docker.io/library/openjdk`
@/all Jib 2.7.0 has been released!
Major Changes
jib.container.expandClasspathDependencies
to preserve the order of loading dependencies as configured in a project. The option enumerates dependency JARs instead of using a wildcard (/app/libs/*
) in the Java runtime classpath for an image entrypoint. (GoogleContainerTools/jib#1871, GoogleContainerTools/jib#1907, GoogleContainerTools/jib#2228, GoogleContainerTools/jib#2733)jib.(to|from).auth.(username|password)
and jib.from.image
using Gradle Property and Provider. (GoogleContainerTools/jib#2905)NullPointerException
when pulling an OCI base image whose manifest does not have mediaType
information. (GoogleContainerTools/jib#2819)docker://...
) that has duplicate layers. (GoogleContainerTools/jib#2829)@/all Jib 2.7.1 is released!
Major Changes
task buildLocalImage(dependsOn:copyReleaseJar, type: com.google.cloud.tools.jib.gradle.BuildDockerTask) {
jibExtension = project.extensions.getByName('jib')
doFirst {
jib.from.image = 'adoptopenjdk:15-jre-openj9'
jib.dockerClient.executable = isMac() ? '/usr/local/bin/docker' : 'docker'
}
outputs.upToDateWhen { false }
}
jlink
? I've found a snippet here, but I'm very curious if there's a discussion on workflows with jib and jlink.
Hi folks,
Is there anyway I can make Jib preserve the timestamps of files when I add layers?
The reason I am interested in this is because I am trying to automate the generation of AppCDS (Application Class Data Sharing) in Quarkus when a container image build is requested via Jib.
Everything works fine until the point where the JDK checks the timestamps of the jars are on the classpath (to ensure that what is in the shared archive matches what is on the supplied runtime classpath) at which point it fails - because the timestamps of the jars have changed when they were added to the layer.
Is there anything that can be done on the Jib side?
Just as a note, we use Jib core directly in Quarkus, so I can change how we interact with Jib at will - we don't use the Maven or Gradle plugins.
Thanks!
@/all Jib Maven/Gradle plugins 2.8.0 and Jib Core 0.18.0 have been released!
Major Changes for Build Plugins
mirror.gcr.io
) are supported. (GoogleContainerTools/jib#3011)Major Changes for Jib Core
Containerizer#addRegistryMirrors
for configuring registry mirrors for base images. This is useful when hitting Docker Hub rate limits. Only public mirrors (such as mirror.gcr.io
) are supported. (GoogleContainerTools/jib#2999)See CHANGELOG.md (Jib Maven plugin / Jib Gradle plugin / Jib Core) for more details.
jib.to.image
. Doesn't that create two different sha digests for the two builds? I wonder if there are any issues with that. Is there a way to ensure that the same image is pushed to both registries with the same digest? Thank you!
<configuration>
<from>
<image>openjdk:8-jre-alpine</image>
</from>
<to>
<image>cms</image>
</to>
<container>
<volumes>
<volume>
/mydirectory
</volume>
</volumes>
</container>
</configuration>
df
I don't see it mounted, am I missing anything here?
[2021-04-14T21:33:00.939Z] > java.io.IOException: Failed to open or parse global Jib config file; see https://github.com/GoogleContainerTools/jib/blob/global-config-doc/docs/faq.md#where-is-the-global-jib-configuration-file-and-how-i-can-configure-it to fix or you may need to delete ?/.config/google-cloud-tools-java/jib/config.json
Hi,
I just realized that the base image for java projects has been changed from distroless to adoptopenjdk.
https://github.com/GoogleContainerTools/jib/blob/master/docs/default_base_image.md
But is not clear to me the reason,
is it distroless deprecated?
is it distroless discouraged to use?