-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider options for setting image creation time while maintaining reproducibility #413
Comments
this sounds infeasible. |
Why? I think this thread brings up some feasible suggestions https://groups.google.com/forum/#!msg/istio-dev/nuv6UaBFGDk/sR-dfoc9CgAJ, like making it user configurable (which would let people do things like tie image creation time to a specific commit's timestamp) If you don't think it's worth it we can close this issue. |
Tycho, a set of extensions to Maven for building Eclipse/OSGi bundles that we use for CT4E, generates a timestamp using a pluggable provider. Tycho provides a git-based timestamp provider that uses JGit to determine the timestamp of the last commit within a project directory. This is it in action in CT4E: the |
Since there are a lot of issues asking about this, we should probably provide a solution for users. Proposal: Add a <configuration>
<container>
<useCurrentTimestamp>true</useCurrentTimestamp>
</container>
</configuration> When using this configuration, the build log will also display a warning saying that the image is not reproducible because This is not letting users add their own timestamps because we would have to most likely implement custom parsers to convert into the format that is necessary for the container configuration. |
It doesn't work, when I config just like this : <plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>0.9.6</version>
<configuration>
<to>
<image>myimage</image>
</to>
<container>
<useCurrentTimestamp>true</useCurrentTimestamp>
</container>
</configuration>
</plugin> the error log : |
Hi @lovelivestyle1102 , this is currently in the works and will be available in version |
Where can I get this version? |
@lovelivestyle1102 It isn't available yet because some changes are unfinished (including this one), but it'll hopefully be out some time this week. When that happens you'll be able to use the new version by changing the |
I compile it from the master by myself, 0.9.7 version can't get it from the maven repository. |
@lovelivestyle1102 I see you are willing to build Jib from source and use it in the other projects of yours to use the latest unstable features of Jib. In that case, you'll probably want to install (i.e., putting) the Jib SNAPSHOT JAR into your local Maven repository ( <plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>0.9.7-SNAPSHOT</version>
<configuration> |
@lovelivestyle1102 version @Geethree @cwensel @zeusbaba you can now use the <configuration>
<container>
<useCurrentTimestamp>true</useCurrentTimestamp>
</container>
</configuration> |
With the following plugin configuration, while issuing "mvn jib:dockerBuild" I get an image appearing as created 49 years ago.
|
@jbprek I cannot reproduce it. Are you defining the <plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>1.1.2</version>
<configuration>
<to>
<image>testingtimestamp</image>
</to>
<container>
<useCurrentTimestamp>true</useCurrentTimestamp>
<jvmFlags>
<jvmFlag>-Xmx128m</jvmFlag>
</jvmFlags>
</container>
</configuration>
</plugin> I can see it sets the current timestamp.
|
anyone hitting this from google, the i.e.
|
Yes that was deprecated and you are using the updated config. You can always look at the README for the most up to date config, and track updates in the CHANGELOG In general we try to follow semantic versioning, if you have upgraded from |
Note, the new |
0.9.7 changed configuration, see: GoogleContainerTools#413 creationTime no longer works.
Followup from discussion: #412 (comment)
The text was updated successfully, but these errors were encountered: