nlewo / nix2container

An archive-less dockerTools.buildImage implementation
Apache License 2.0
518 stars 48 forks source link

feat: adds support for extra tags #60

Closed jmgilman closed 1 year ago

jmgilman commented 1 year ago

Solves #59. It should be backward compatible since it adds an extraTags argument to buildImage. If omitted, the default logic of just pushing the single tag is retained.

nrdxp commented 1 year ago

@nlewo would you accept this if we did a deprecation for tag similar to the way it was done for contents, and make this a single option tags which is always a list. Then we can just check to make sure that the list is not empty as a sanity check.

blaggacao commented 1 year ago

https://github.com/nlewo/nix2container/pull/65 enables this use case to be implemented in custom action code.

nlewo commented 1 year ago

Since this can be implemented thanks to meta workaround, we could close this MR.

As previously discussed, i would prefer to avoid adding tags, names, and registries attributes to the buildImage function, since it's purpose it to build an image and not to push it. I also understand you want to attach such kind information to the image. So, the meta attribute looks like a good tradeoff :+1:

@jmgilman feel free to reopen this PR if i close it too quickly.