-
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
Created timestamp is wrong for newly built docker image #2252
Comments
This is intended, as the timestamp is wiped to maintain reproducibility. See the FAQ for more details: https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#why-is-my-image-created-48-years-ago |
@TadCordle BTW, JIB builds docker images on it's own to override some parameters like |
@ppiotrow are you asking how to set the |
@loosebazooka Yes, sorry for asking here in JIB project but I had multiple tabs open while googling for it. The override for "created" in not present in the docker API. I'd like to copy some JIB functionalities to SBT Native Packager Plugin. We already have layers for dependencies&application classes, but when building on different hosts it gives nothing as long as "created" is not fixed. |
@ppiotrow I don't think the docker cli allows for that (I could be wrong). There is a jib-sbt-plugin developed with the jib-core library by a community member, perhaps that could help with some of your problems? If not you might be able to use jib-core yourself to do what you need? |
I've seen the plugin for sbt and I think it's great that it exists giving people possibility to use JIB. The SBT Native Docker Packager uses official docker daemon to build images. It only misses reseting file timestamps (simple) and images creation time (impossible now) to have reasonable support for reproducible builds. I'll contact docker maintainers to add missing option. Thank you for discussion. |
Just FYI, the |
Environment:
Description of the issue:
When I build a docker image for spring boot application using jib maven plugin, the creation date says
50 years ago
which is really strangespringbootjib latest 008a4f225d1d 50 years ago 141MB
Expected behavior:
Expected behavior: The created date should reflect the latest time when it was created
Steps to reproduce:
pom.xml
underplugins
sectionmvn compile jib:dockerBuild
to generate docker image.jib-maven-plugin
Configuration:jib-gradle-plugin
Configuration:Log output:
Additional Information:
As can be seen from the above output, the image was created on
Finished at: 2020-01-28T14:01:21Z
but the docker timestamp is differentThe text was updated successfully, but these errors were encountered: