Skip to content

Replace the stale io.webdevops.version=1.5.0 label with OCI labels set by the CI #665

Open

Description

@Kanti

The label today

  • The macro version() in template/Dockerfile/docker.twig sets io.webdevops.version=1.5.0. docker/bootstrap/ubuntu-22.04 and docker/php/<tag> use it, and every other image inherits it from its parent. So every published image says 1.5.0.
  • Up to 1.5.0 (2017-03-01), every release commit raised the number. In April 2017, 6f4a936 removed the macro from the derived images and a5630a0 merged the labels of the bootstrap template into one LABEL. The releases 1.6.0 and 1.7.0 no longer raised it, and 1.7.0 (2017-05-15) is the last tag.
  • Nothing reads the label: there is no match in ci/, provisioning/, tests/ or the workflows. The images have no release tags either: the CI builds every push to master and runs every night, and the tags come from the folder names.

So the label states a version that the images have not had since 2017, and it does not say which build an image comes from.

Proposal

  • Remove io.webdevops.version from the macro version().
  • Let the CI set two OCI labels on every image it builds, through the labels input of docker/build-push-action (generated by ci/src/GithubJobBuilder.php):
    • org.opencontainers.image.revision: the commit, ${{ github.sha }}
    • org.opencontainers.image.created: the build time, RFC 3339
  • Set them in the CI, not as LABEL in the Dockerfile. In the Dockerfile, they would need a build argument that changes with every build and invalidates the cache of every layer after it. The labels input only changes the image configuration.
  • Optional: the static org.opencontainers.image.source=https://github.com/webdevops/Dockerfile can go into the macro instead.

Notes


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions