Skip to content

Accept full semver in tag (add build metadata support with + symbol) #4877

Closed as not planned
@Murazaki

Description

@Murazaki

Description

A prior decision has been taken to not accept the + symbol on tag names. The documentation states it here :

After the image name, the optional TAG is a custom, human-readable manifest identifier that's typically a specific version or variant of an image. The tag must be valid ASCII and can contain lowercase and uppercase letters, digits, underscores, periods, and hyphens. It can't start with a period or hyphen and must be no longer than 128 characters. If you don't specify a tag, the command uses latest by default.

https://docs.docker.com/engine/reference/commandline/image_tag/

This goes directly against the semver notation, since semver accepts the + symbol as an indicator of build metadata.
The reasoning for this is that builds should not differ.

The issue is this is highly opinionated and there's several cases where this does not work:

  • When CI rebuilds an image, it may break it, then it is very hard to come back to previous for users apart for searching for the image SHA, which is less readable and meaningful for them
  • Build metadata is used for patching, but also forking an app. In this case we lose highly valuable information on the version of the image

The request is simple (even though accepting it and implementing it might be very complex depending on the pipelines affected) : accept + in tag names to fix semver compliance and give back this possibility to users

This issue is linked to docker/metadata-action#385 and docker/metadata-action#384

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions