-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
dockerTools: align generated layer archives with docker's output #58431
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To be totally consistent with the way Docker builds images we need to include the /nix/store in the layer tarballs first.
GrahamcOfBorg
added
8.has: documentation
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild on Darwin
10.rebuild-linux: 0
This PR does not cause any packages to rebuild on Linux
labels
Mar 27, 2019
Mic92
changed the title
Alex/nix layers
dockerTools: align generated layer archives with docker's output
Mar 27, 2019
@GrahamcOfBorg test docker-tools |
nlewo
approved these changes
Mar 27, 2019
shlevy
pushed a commit
that referenced
this pull request
Mar 27, 2019
dockerTools: align generated layer archives with docker's output (cherry picked from commit 6af3176)
shlevy
pushed a commit
that referenced
this pull request
Mar 27, 2019
dockerTools: align generated layer archives with docker's output (cherry picked from commit 6af3176)
10 tasks
danieldk
added a commit
to danieldk/nixpkgs
that referenced
this pull request
Jun 6, 2019
PR NixOS#58431 added /nix/store to each layer.tar. However, the timestamp was not explicitly set while adding /nix and /nix/store to the archive. This resulted in different SHA256 hashes of layer.tar between image builds. This change sets time and owner when tar'ing /nix/store.
nlewo
pushed a commit
that referenced
this pull request
Jun 6, 2019
PR #58431 added /nix/store to each layer.tar. However, the timestamp was not explicitly set while adding /nix and /nix/store to the archive. This resulted in different SHA256 hashes of layer.tar between image builds. This change sets time and owner when tar'ing /nix/store. (cherry picked from commit d7f3186)
10 tasks
alexbiehl
pushed a commit
to alexbiehl/nixpkgs
that referenced
this pull request
May 24, 2020
In NixOS#58431 the authors ensured that the resulting layer.tar would always list /nix/ /nix/store/ first to fully comply to the tar spec. Various refactorings later it is only ensured to create /nix/ but NOT /nix/store anymore. Instead tar transformed them to /nix/nix and /nix/nix/store.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
8.has: documentation
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild on Darwin
10.rebuild-linux: 0
This PR does not cause any packages to rebuild on Linux
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
This PR makes docker images created by nix to be exactly the same as images created by docker. We encountered proprietary software that doesn't implement the full tar spec.
@shlevy @grahamc
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)