Skip to content
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

Make star-randsrv build reproducibly. #55

Merged
merged 1 commit into from
Apr 14, 2023
Merged

Conversation

NullHypothesis
Copy link
Contributor

@NullHypothesis NullHypothesis commented Apr 11, 2023

This commit makes two changes:

  1. Invoke kaniko with the flag --custom-platform linux/amd64. This is necessary when building star-randsrv on non-Linux, non-amd64 platforms like macOS.

  2. Use an intermediate build layer to add start.sh. If we don't do this, we may end up with a build layer that contains inconsistent file permissions from the host operating system.

With the above two changes, it's now possible to arrive at identical image IDs, even when building star-randsrv on Linux (amd64) and macOS (arm64).

This commit makes two changes:

1. Invoke kaniko with the flag '--custom-platform linux/amd64'.  This is
   necessary when building star-randsrv on non-Linux, non-amd64
   platforms like macOS.

2. Use an intermediate build layer to add start.sh.  If we don't do
   this, we may end up with a build layer that contains inconsistent
   file permissions from the host operating system.

With the above two changes, it's now possible to arrive at identical
image IDs, even when building star-randsrv on Linux (amd64) and macOS
(arm64).
@NullHypothesis NullHypothesis requested a review from a team as a code owner April 11, 2023 16:43
Copy link
Collaborator

@DJAndries DJAndries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@NullHypothesis NullHypothesis merged commit 368be97 into rust Apr 14, 2023
@NullHypothesis NullHypothesis deleted the reproducible-build branch April 27, 2023 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants