Skip to content

Commit

Permalink
oci_tarball: fix file time to 2000-01-01 for files inside the tar
Browse files Browse the repository at this point in the history
This way we can generate reproducible tars and avoid sha256sums changing
for the tar output of the oci_tarball rule.
  • Loading branch information
gergelyfabian committed Sep 29, 2023
1 parent ca579be commit 49fba77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oci/private/tarball.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ layers="${LAYERS}" \
--output-format json > "${STAGING_DIR}/manifest.json"

# TODO: https://github.com/bazel-contrib/rules_oci/issues/217
tar -C "${STAGING_DIR}" -cf "${TARBALL_PATH}" manifest.json blobs
tar -C "${STAGING_DIR}" -cf "${TARBALL_PATH}" --mtime='2000-01-01' manifest.json blobs

0 comments on commit 49fba77

Please sign in to comment.