Jib: Allow configuring container creation timestamp in plugins

Created on 8 Apr 2019  路  2Comments  路  Source: GoogleContainerTools/jib

instead of just whether or not to use current timestamp. We could change the useCurrentTimestamp parameter to take either a boolean, or an integer number of milliseconds since epoch, or rename the parameter to just timestamp and take a string to determine whether to use current timestamp or a specific timestamp.

arejib-gradle-plugin arejib-maven-plugin

Most helpful comment

1.5.0 released with the feature to configure the container creation time. See the jib.container.creationTime doc for Maven/Gradle.

For configuring file modification times, see https://github.com/GoogleContainerTools/jib/issues/1608#issuecomment-522659932.

@ST-DDT

All 2 comments

I would like to set the docker image timestamp to the time of the git commit that was used to build the underlying java classes. IIRC the docker image list has a created date, that shows the age of the image. Falsifying this image date results in a loss of useful information especially if "old images" should be garbage collected.

For plugins it might be useful to provide a timestamp + a format string to allow optimal flexibility when choosing the timestamp source.

1.5.0 released with the feature to configure the container creation time. See the jib.container.creationTime doc for Maven/Gradle.

For configuring file modification times, see https://github.com/GoogleContainerTools/jib/issues/1608#issuecomment-522659932.

@ST-DDT

Was this page helpful?
0 / 5 - 0 ratings