-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
build-support: Fix error when building images with many layers #141050
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some superficial things left.
Could you also squash the commit and prefix with dockerTools:
instead? It's more recognizable.
I marked this as stale due to inactivity. → More info |
I bumped into this jq Argument list issue, this PR fixed it! Do you want help getting this PR across the finishing line @koenw ? |
bba634b
to
5fb1a00
Compare
@ofborg test docker-tools |
When building a docker image using `dockertools.buildLayeredImage`, the resulting image layers are passed to `jq` through the command line. When building an image with too many layers this would exceed the maximum command line argument length. Hence, we store the list of layers in the Nix store and pass them to `jq` as a file argument using `--slurpfile`. Fixes NixOS#140908.
5fb1a00
to
2f5fcda
Compare
Thank you @koenw! |
When building a docker image using
dockertools.buildLayeredImage
, the resulting image layers are passed tojq
through the command line. When building an image with too many layers this would exceed the maximum command line argument length.Hence, we store the list of layers in the Nix store and pass them to
jq
as a file argument using--slurpfile
.Fixes #140908.
Motivation for this change
To fix #140908.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)