Hi,
Currently there is no option to find out from docker manifest what is the version which it was built for. Therefore I created pull request (https://github.com/prometheus/prometheus/pull/8435) to introduce this option. This will allow us to add version label to each image.
The change is small. Makefile.common already relies on VERSION file to calculate DOCKER_MAJOR_VERSION_TAG variable so there is no additional dependency. This change will introduce new warning until the docker files will be changed: '[Warning] One or more build-args [VERSION] were not consumed' but no new errors.
Thanks,
Assaf Katz