gdal icon indicating copy to clipboard operation
gdal copied to clipboard

Use a naming scheme that is typically used for container images

Open HendrikSchrieber opened this issue 6 months ago • 4 comments

Feature description

Although there is no rule that forces you to tag your container images in a certain way, most providers of container images follow the semver versioning scheme where a version is followed by a suffix, if needed. For this project a tag following the usual scheme would look something like "3.11.0-ubuntu-small" while instead of "small" often the term "slim" is used.

Example: https://hub.docker.com/_/node

Not following this scheme brings with it certain issues when using other (automation or management) tools in the container/cloud ecosystem, e.g. Renovate Bot.

I therefore suggest to update the container image versioning scheme to follow semver versioning.

Additional context

No response

HendrikSchrieber avatar Jun 24 '25 12:06 HendrikSchrieber

I apologize that I do not understand much about container images. Do you mean that using suffix is better than using prefix? If the images of releases are now named like gdal:ubuntu-small-3.11.0 you think it would be better to have them as gdal:3.11.0-ubuntu-small

Could you clarify "Not following this scheme brings with it certain issues when using other (automation or management) tools in the container/cloud ecosystem, e.g. Renovate Bot." What exactly are those certain issues? Is the Renovate Bot something that is likely used by very many GDAL container users?

jratike80 avatar Jun 24 '25 13:06 jratike80

No need to apologize. Yes, I think a suffix would be better since this is the way most container images are tagged. It is conform to SemVer versioning and many tools will rely on or expect this versioning scheme.

Renovate Bot is a tool to automatically update dependencies e.g. docker base images. If GDAL container images are used in a cloud environment or with a CI/CD pipeline (like GitHub Actions) by its users it is likely that Renovate Bot or a similar tool will be used. Renovate Bot can recognize and match different version schemes to detect if updates for dependencies are available but it can only try to match the most common version schemes. So by default, it will be able to match docker tags following the SemVer Specification automatically. For other versioning schemes manual configuration is possible but most users especially beginners will probably use the default configuration.

I do not know how many GDAL users use the container image in this way but it would be rather common for automated workflows in cloud environments.

HendrikSchrieber avatar Jun 25 '25 07:06 HendrikSchrieber

I read from https://semver.org/ that it defines a version number MAJOR.MINOR.PATCH and that we follow. I don't find anything explicit about prefixes and suffixes or how to use them for telling the compatible platform.

By the Renovate Bot documentation https://docs.renovatebot.com/docker/#version-compatibility they do not themselves think that they handle the suffixes in the SemVer way but in a way that they consider to be typical in Docker.

Although suffixes in SemVer indicate pre-releases (e.g. v1.2.0-alpha.2), in Docker they typically indicate compatibility, e.g. 1.2.0-alpine. By default Renovate assumes suffixes indicate compatibility,

I could not find a reference that recommends using suffixes like 3.11.0-ubuntu-small in Docker yet. It seems that different naming conventions exists. Renovate Bot seems to support "regexp versioning" for handling different conventions. I am not against changing the names, I just try to understand the situation. However, the title of the issue feels wrong "Use SemVer versioning for container images". By my short literature review the GDAL images use SemVer already. Maybe the title should rather be "Use a naming schema that is typically used in Docker for container images", with a reference to a document that proves that "typically" is true.

jratike80 avatar Jun 25 '25 09:06 jratike80

Fair enough. I changed the title as you suggested. It is more like the "pre-release" part in SemVer specification is used as compatibility, as stated in the Renovate docs you quoted. I didn't describe that point very specific. So it is a wider interpretation of SemVer but the "pre-release" is defined in the SemVer specification and is just given a different meaning in the Docker/container context.

I cannot provide a reference to a single document proving my argument since it is not a strict rule or even a recommendation by Docker. Nevertheless, if you take a look at DockerHub, most common images will follow the scheme and have a "-alpine" or "-ubuntu-slim" suffix.

It is possible to configure Renovate using "regexp versioning" you mentioned. However, beginners probably will use a pre-defined configuration and extra effort will be required.

HendrikSchrieber avatar Jun 25 '25 10:06 HendrikSchrieber