Skip to content

Commit

Permalink
oci_tarball: fix user and group to numeric 0
Browse files Browse the repository at this point in the history
Tar saves not only the time, but also the user and group.
Applied suggestion from for these two pieces of information from:

http://h2.jaguarpaw.co.uk/posts/reproducible-tar/.
  • Loading branch information
gergelyfabian committed Oct 2, 2023
1 parent 96582a4 commit 005a4d4
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}" --mtime='2000-01-01' manifest.json blobs
tar -C "${STAGING_DIR}" -cf "${TARBALL_PATH}" --mtime='2000-01-01' --owner=0 --group=0 --numeric-owner manifest.json blobs

0 comments on commit 005a4d4

Please sign in to comment.