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)
-z
(zip), -b
(bzip) or -j
when using tar
.
extraDirectories
setting is evaluated during the Configuration Stage of the plugin, when the directory is not present yet.
Hello! I'm trying to execute ./gradlew build jibDockerBuild
for a Spring Boot app written in Kotlin, targeting Java 11, via the Jib Gradle plugin v3.2.0 (I'm on macOS 12.2).
When I attempt to execute the Gradle task, I encounter the following error: com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: Cannot run program "docker": error=2, No such file or directory
I haven't seen a ton of other people with this same issue, and the response I've seen to those few occurrences is that the Docker CLI isn't installed. However, I do have Docker installed (via Docker Desktop for Mac), and the "docker" command is recognized in the same terminal that I attempt to execute the Gradle task in. So I definitely have Docker installed, it just seems like Jib doesn't recognize my PATH.
Any ideas would be appreciated. Thanks!
@/all Jib CLI 0.10.0 has been released!
Major Changes
See CHANGELOG.md for more details.
Hi Fellows,
I'm trying to pull eclipse-temurin image, but I'm getting 401 error - Unauthorized for registry-1.docker.io/library/eclipse-temurin: 401
Config:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<spring.boot.dependecies.plugin.version>2.5.7</spring.boot.dependecies.plugin.version>
<spring.boot.maven.plugin.version>2.5.7</spring.boot.maven.plugin.version>
<spring.cloud-version>2020.0.5</spring.cloud-version>
<image>ooxaam/${project.artifactId}:${project.version}</image>
</properties>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>3.1.4</version>
<configuration>
<from>
<image>eclipse-temurin:17@sha256:2b47a8ea946ce1e5365a1562414ed576e378b7b670cadff3fb98ebecf2890cdc</image>
</from>
<to>
<tags>
<tag>latest</tag>
</tags>
</to>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
Output:
Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.1.4:build (default) on project customer: com.google.cloud.tools.jib.api.RegistryUnauthorizedException: Unauthorized for registry-1.docker.io/library/eclipse-temurin: 401 Unauthorized
[ERROR] {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Class":"","Name":"library/eclipse-temurin","Action":"pull"}]}]}
tasks.build.dependsOn(tasks.jib)
Hello I'm new with jib plugin, but I have got a full running local registry with HTTP, so I have enabled insecure registry, but where I need to put that my credentials should send without HTTPS, my current config does not seem to work
<configuration>
<allowInsecureRegistries>${docker.insecure}</allowInsecureRegistries>
<sendCredentialsOverHttp>${docker.insecure}</sendCredentialsOverHttp>
<to>
<image>${docker.prefix}${project.artifactId}:${docker.tag}</image>
<auth>
<username>${docker.user}</username>
<password>${docker.password}</password>
</auth>
</to>
<from>
<image>docker://${docker.base}</image>
</from>
<extraDirectories>
<paths>${project.build.directory}/lib</paths>
</extraDirectories>
</configuration>
The tag <sendCredentialsOverHttp>
seems not to be on the right place but does not work in auth
as well. I get the issue Unable to parse configuration of mojo com.google.cloud.tools:jib-maven-plugin:3.2.1:build for parameter sendCredentialsOverHttp: Cannot find 'sendCredentialsOverHttp' in class com.google.cloud.tools.jib.maven.JibPluginConfiguration$ToAuthConfiguration
Hello, how can I copy a single file into a directory which contains files. I try to use this
<extraDirectories>
<paths>
<path>
<from>${project.build.directory}</from>
<into>/app</into>
<includes>
<include>${project.build.finalName}.jar</include>
</includes>
</path>
</extraDirectories>
But this overwrite the whole /app
directory, my app directory contains based on the based docker image some existing files. The goal is copy a single file into an existing target directory, without overwriting the target directory
/app
directory, because in my case I would like to build a spark image, so Jib copies additional stuff to the container and I did not want this. In my case I would like to build my jar and copy the jar by an extraDirectory to my container and also some additional dependency jar files. So I would like to keep everything as it is in my base image and copy some files only to the container.