-
Notifications
You must be signed in to change notification settings - Fork 68
Improve image-pulling Nix functions #169
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
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.
@mikepurvis since you contributed this pull method, could you try this branch in your environment to ensure there is no regression?
Thanks for the ping! I'm actually not at that company any more, so I'm not in a good position to validate it. Overall looks good though, a bunch of nice bits of cleanup. |
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.
Thank you for your reviews, and apologies for not following up earlier.
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.
Big step forward, appreciate the changes
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.
Thank you for these changes. They looks good to me.
The nix-user test doesn't pass anymore:
[lewo@tilia:~/repos/nix2container]$ ./result/bin/test-script
Copy to podman image nix-user:v1digy83svcsv8vsz7vb298ifqh44amm
Getting image source signatures
Copying blob eba581bc4872 skipped: already exists
Copying config 75688190dd done |
Writing manifest to image destination
image list
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/library/nix-user v1digy83svcsv8vsz7vb298ifqh44amm 75688190dd1f 19 minutes ago 130 MB
Actual output:
Expected pattern:
(?s)[PASS].*[PASS].*[PASS].*drwxr-xr-x \d+ user user 4096 Jan 1 1970 store
Error: test failed
[lewo@tilia:~/repos/nix2container]$ more ./result/bin/test-script
/nix/store/h5f82kj3iciz5n7r2p7yaih3dvz5v2kh-copy-to-podman/bin/copy-to-podman
/nix/store/50q2v4hbj0hwzlfnvkds9670l0zy20b5-podman-5.4.1/bin/podman run nix-user:v1digy83svcsv8vsz7vb298ifqh44amm | /nix/store/gqmr3gixlddz3667ba1iyqck3c0dkpvd-gnugrep-3.11/bin/grep -Pz '(?s)[PASS].*[PASS].*[PASS].*drwxr-xr-x \d+ user user 4096 Jan 1 1970 store'
ret=$?
if [ $ret -ne 0 ];
then
echo "image list"
/nix/store/50q2v4hbj0hwzlfnvkds9670l0zy20b5-podman-5.4.1/bin/podman image list
echo ""
echo "Actual output:"
/nix/store/50q2v4hbj0hwzlfnvkds9670l0zy20b5-podman-5.4.1/bin/podman run nix-user:v1digy83svcsv8vsz7vb298ifqh44amm
echo
echo "Expected pattern:"
echo '(?s)[PASS].*[PASS].*[PASS].*drwxr-xr-x \d+ user user 4096 Jan 1 1970 store'
echo
echo "Error: test failed"
exit $ret
else
echo "Test passed"
fi
[lewo@tilia:~/repos/nix2container]$ /nix/store/50q2v4hbj0hwzlfnvkds9670l0zy20b5-podman-5.4.1/bin/podman run --entrypoint /bin/nix nix-user:v1digy83svcsv8vsz7vb298ifqh44amm --extra-experimental-features nix-command config check
error: creating directory '/nix/store/.links': Permission denied
|
Fixed! All workflows are now passing |
|
Thank you all for these nice improvements! |
buildImageBlobscript inpullImageFromManifestto support more registries (e.gnvcr.iodoesn't return aservice=param in itsWWW-Authenticateheader)cacertto nativeBuildInputs to use its setup hook instead of explicitly setting SSL_CERT_FILE inpullImageandbuildImageBlobBetter reviewed commit by commit :)