You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace the stale io.webdevops.version=1.5.0 label with OCI labels set by the CI #665
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.
Users who read io.webdevops.version lose it. As it has said 1.5.0 since 2017, it cannot have been of use to them.
Check with docker inspect --format '{{ json .Config.Labels }}' on a build of the CI that each image has the revision and created of its own build, not those inherited from its parent.
Activity