nix2container icon indicating copy to clipboard operation
nix2container copied to clipboard

Allow layer author, comment, and created-by metadata to be set

Open FenTiger opened this issue 1 year ago • 4 comments

This adds an optional metadata argument to buildLayer which allows the corresponding information strings to be set in the image history.

FenTiger avatar Aug 22 '24 11:08 FenTiger

I think I've addressed all your points, but I had some trouble getting the tests to run, so I'm not certain that the new test actually passes.

Hopefully I'll get time this weekend to install podman and have a closer look locally.

FenTiger avatar Aug 28 '24 12:08 FenTiger

I think you can add a test such as the one added by this pr.

Also, you don't really need to install podman since you would get it transparently via nix run .#tests.your-test

nlewo avatar Aug 29 '24 06:08 nlewo

Also, you don't really need to install podman since you would get it transparently via nix run .#tests.your-test

The failure I see is

$ nix run .#tests.metadata
warning: Ignoring setting 'auto-allocate-uids' because experimental feature 'auto-allocate-uids' is not enabled
warning: Ignoring setting 'impure-env' because experimental feature 'configurable-impure-env' is not enabled
Copy to podman image metadata:pc579z7vyng8yf04h9qwsfvw40xgcmb2
ERRO[0000] finding newgidmap: exec: "newgidmap": executable file not found in $PATH 
ERRO[0000] (Unable to determine exit status)            
Error during setresgid(0): Invalid argument
Error: command required for rootless mode with multiple IDs: exec: "newuidmap": executable file not found in $PATH
image list
Error: command required for rootless mode with multiple IDs: exec: "newuidmap": executable file not found in $PATH

Actual output:
Error: command required for rootless mode with multiple IDs: exec: "newuidmap": executable file not found in $PATH

Expected pattern:
test author

Error: test failed

Maybe it's not podman that's missing, but I need to install something to make it work.

FenTiger avatar Aug 29 '24 09:08 FenTiger

Fixed. The test is working now.

FenTiger avatar Aug 30 '24 08:08 FenTiger

Is there anything else I need to do to this PR?

FenTiger avatar Nov 01 '24 14:11 FenTiger

Nothing more is actually required. Tests passed locally. Thank you.

nlewo avatar Nov 01 '24 16:11 nlewo