project-copacetic / copacetic

🧵 CLI tool for directly patching container images!
https://project-copacetic.github.io/copacetic/
Apache License 2.0
906 stars 60 forks source link

[REQ] Add support for labels #544

Open javier-lopez opened 5 months ago

javier-lopez commented 5 months ago

What kind of request is this?

New feature

What is your request or suggestion?

Hello copa team,

Thank you for your work on this, recently it has been used in my org to remediate some security OS vulns, when doing so we ended up with patched versions of some of our base images, we're using labels in our dockerfiles to track metadata and though it would be useful if this project could also support some of them: eg:

--label "build-agent=${NODE_NAME}"

Anyway, I just reviewed the issue list and saw nothing related, maybe this can be a discussion starting point, thank you!

Are you willing to submit PRs to contribute to this feature request?

sozercan commented 5 months ago

@javier-lopez can you elaborate more about your use case? are you looking to add new labels? copa should not alter existing labels afaik

javier-lopez commented 5 months ago

Hello @sozercan , sure, the use case is to refresh some of these metadata, eg: rebuilt time, rebuilt node, change mantainer, as of now, we're creating new Dockerfiles using the updated images as base FROM ones and updating the labels afterwards, a process which could be IMO part of the copa rebuild steps.