docker-nomad icon indicating copy to clipboard operation
docker-nomad copied to clipboard

[feature request] Loose tags for container builds ?

Open ednxzu opened this issue 1 year ago • 5 comments

would it be possible to get loose tags on containers (X, X.Y) for releases ?

I would really like to use your container images other nomad related projects, and being able to pin to looser versions would be nice.

I will look into making a PR for this.

Best,

ednxzu avatar Jun 04 '24 16:06 ednxzu

Hey @ednxzu, if you can make a PR for this, that would be super cool and I'd definitely consider it :+1:

multani avatar Jun 04 '24 16:06 multani

I don't really have a clear idea yet of how to do it without disrupting the build process too much, but I'll give it a shot !

ednxzu avatar Jun 04 '24 20:06 ednxzu

@multani Quick question for the implementation, do we want to tag the -rc/-beta/etc.. tags as latest minor/major ? or should it be the latest stable ?

ednxzu avatar Jun 13 '24 21:06 ednxzu

@ednxzu I would keep the latest stable as minor/major and exclude rc/beta.

I'm not sure how doable is it, but if it's possible, it would be great to have a latest-rc and/or latest-beta for instance?

multani avatar Jun 14 '24 13:06 multani

That depends haha, how free am I in executing this ?

It seems rather complicated with the current repository structure and logic, especially for implementing latest-rc and latest-beta.

I made a github action for this very purpose a few months ago. docker-matrix-generator that might be really fitted for this type of stuff.

This is more so done to generate build matrixes, instead of building only a single image for each minor like here.

one idea (the main one) is to have an additional step in the build action that checks the nomad_version output against the github list of tags for hashicorp/nomad, and returns an object like

{
  "latest": false,
  "latest_minor": true,
  "latest_major": false,
  "latest_rc": false,
  "latest_beta": false
}

this can be used here to dynamically add tags to images.

issue: need to most likely add python/ some other high level language scripting in the repo to do this check (way too complicated for a bash script imo)

if that's ok I can probbly get it working sometime next week.

ednxzu avatar Jun 14 '24 18:06 ednxzu