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)
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])));
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
@/all Jib 2.6.0 has been released!
Major Changes for Plugins
/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 }
}