Icinga / docker-icinga2

Official Icinga 2 Docker images
GNU General Public License v2.0
67 stars 30 forks source link

docker hub :master seems older version than :latest #69

Closed dwt closed 3 years ago

dwt commented 3 years ago

After some debugging I have to say I'm thoroughly confused by this. :-)

% docker pull icinga/icinga2:latest
% docker run --rm icinga/icinga2:latest  icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: v2.13.2)
% docker pull icinga/icinga2:master
% docker run --rm icinga/icinga2:master  icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.13.0-1)

It seems to me that :master is actually an older version than :latest. How is that intentional? Am I missing something about how docker works and am using it wrong?

This came up while trying to get the latest version of everything running to try and give feedback on resolved bug reports.

julianbrost commented 3 years ago

That's a display issue issue with the version number. For some reason (I haven't had the time yet to look into this), when built on GitHub Actions, our Docker images fail to use the version number from Git, but instead use the hard-coded one from the source (which still is 2.13.0 on the master branch). I thought there already was an open issue for this but I can't it, so then this is probably the issue for it.

dwt commented 3 years ago

Well, that explains my confusion, thanks for the heads up and I'm glad if you use this issue to track this fix.

julianbrost commented 3 years ago

Fixed in the latest icinga/icinga2:master image now pushed to Docker Hub, icinga2 --version now shows:

icinga2 - The Icinga 2 network monitoring daemon (version: v2.13.0-116-g361807f7a)
dwt commented 3 years ago

Out of interest, :latest shows v2.13.2- isn't that much newer than v2.13.0-116-g361807f7a- am I missing something here?

julianbrost commented 3 years ago

For the bugfix releases, we fork into a separate branch, for example support/2.13 and the v2.13.1/v2.13.2/... tags only exist on that branch and not master. Thus, git describe won't use them. Probably not perfect, but an explanation for why it is like this at the moment.

dwt commented 3 years ago

As long that this means that master is actually code that contains all of that 2.13.2 I am happy. I have to say though that I find it confusing that you don't update master to contain the latest version it actually represents - that seems to invite confusion among casual contributors.

dwt commented 3 years ago

Maybe I can make an even stronger case to change this as it confused even @lippserd who is afaik a senior contributor to the project.

lippserd commented 3 years ago

I wasn't aware that the master image is sometimes missing the commit hash.

But many of our projects don't have the latest tag in the master since tags are tied to commits and you can't just cherry-pick them around. We are aware of that situation but did not have time yet to fix that properly where we identify the latest tag.