Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@m-bdf
Copy link
Contributor

@m-bdf m-bdf commented May 23, 2025

  • Rewrite the buildImageBlob script in pullImageFromManifest to support more registries (e.g nvcr.io doesn't return a service= param in its WWW-Authenticate header)
  • Add cacert to nativeBuildInputs to use its setup hook instead of explicitly setting SSL_CERT_FILE in pullImage and buildImageBlob
  • Other small improvements in Nix code

Better reviewed commit by commit :)

Copy link
Owner

@nlewo nlewo left a 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?

@mikepurvis
Copy link
Contributor

mikepurvis commented Jun 2, 2025

@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.

Copy link
Contributor Author

@m-bdf m-bdf left a 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.

Copy link
Contributor

@mikepurvis mikepurvis left a 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

Copy link
Owner

@nlewo nlewo left a 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

@m-bdf
Copy link
Contributor Author

m-bdf commented Oct 28, 2025

Fixed! All workflows are now passing

@nlewo
Copy link
Owner

nlewo commented Oct 29, 2025

Thank you all for these nice improvements!

@nlewo nlewo merged commit e5496ab into nlewo:master Oct 29, 2025
4 checks passed
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.

3 participants