Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does Docker have builds and not GitHub tags are pushed? #248

Open
williamdes opened this issue May 20, 2024 · 10 comments
Open

Why does Docker have builds and not GitHub tags are pushed? #248

williamdes opened this issue May 20, 2024 · 10 comments

Comments

@williamdes
Copy link
Contributor

@thomascube I noticed no new git tags are pushed but that the image gets updated.
What is the new process?

@thomascube
Copy link
Member

The github actions are not set up to create tags. Previously, tagging (and thus releasing) was a manual process which triggered builds on Docker Hub. Because of the new automation with Github actions, tags are no longer needed. That saying, suggestions how to extend our actions to create tags again are welcome.

@williamdes
Copy link
Contributor Author

That saying, suggestions how to extend our actions to create tags again are welcome.

Okay, thanks
I think having tags is good to know from what was thrown the workflow

@thomascube
Copy link
Member

We could consider to create tags for each version again but some questions come to my mind:

  • How to build new images if we make changes to the Dockerfile but the Roundcube version is unchanged?
    • Moving the Git tag?
    • Different versioning schema for Docker images?
  • Same question for periodic updates of the base image (php) without Roundcube version changes.
  • How to do auto-update as we currently do with the update.sh cron job?
    • Can github actions create tags?

@williamdes
Copy link
Contributor Author

We could consider to create tags for each version again but some questions come to my mind:

* How to build new images if we make changes to the Dockerfile but the Roundcube version is unchanged?

Trigger the same tag once more ?

  * Moving the Git tag?

This one is for me a bad option, avoid moving git tags.

  * Different versioning schema for Docker images?

* Same question for periodic updates of the base image (php) without Roundcube version changes.

* How to do auto-update as we currently do with the update.sh cron job?
  
  * Can github actions create tags?

Using git tags is quite easy and will do the trick
You can automate all this
Look at how I derived GitHub caching to do this here: https://github.com/sudo-bot/docker-phpmyadmin-snapshots/blob/main/.github/workflows/cron.yml

And when a release is published, then it is built: https://github.com/sudo-bot/docker-phpmyadmin-snapshots/blob/main/.github/workflows/publish.yml#L8

@pabzm
Copy link
Member

pabzm commented Nov 8, 2024

I don't quite understand this issue. Roundcubemail uses git-tags only for releases, if I am not mistaken. And these releases are picked up by update.sh. And the images are tagged with the version numbers, too.

Can someone explain what's missing?

@williamdes
Copy link
Contributor Author

Can someone explain what's missing?

For example this update has no git tag, it should have one.
Ref: 3deedba
Ref: https://github.com/roundcube/roundcubemail-docker/tags

Each new released version send to the Docker hub should have a tag, and I noticed that there is no more

@pabzm
Copy link
Member

pabzm commented Dec 11, 2024

@williamdes I'm still a little confused, sorry. Do you speak about git-tags in the commit-log of this repository, or container-tags on the built images? Or maybe container-labels on the images?

Because the container-images do all have tags: https://hub.docker.com/r/roundcube/roundcubemail/tags

I also don't understand your previous comments. How is "Trigger the same tag once more" different from moving a git-tag to a different commit?

And the links you posted in that comment create tagged releases – but we don't do releases in this repository?

@pabzm
Copy link
Member

pabzm commented Dec 11, 2024

To make it more concrete:

For example this update has no git tag, it should have one.

Which git-tag do you think that commit should have?

Each new released version send to the Docker hub should have a tag, and I noticed that there is no more

What do you mean by "released version"? A release from roundcube/roundcubemail?

Which tag do you think the latest built container image should have?

@thomascube
Copy link
Member

This is how I understand this discussion. It raises two questions

  • what shall tags in the Docker repo represent? Roundcube release versions or Docker build versions?
  • and second, how do these tags in the Docker repository correlate with tags (or other identifiers) in this Git repository?

Both not easy to answer because very much a matter of taste and philosophy.

So far the tags we published in the Docker repo represent the Roundcube release versions. They can be replaced/updated with new builds from this repository that inherit either changes in the base images or in the Dockerfiles. This way consumers can subscribe to a Roundcube release and still get the latest updates from the PHP base images.

This pattern is hard to map 1:1 with Git tags and we did a bad job regarding this in the past. Changes to the Dockerfiles can be applied to tags by constantly shifting tags to new commits but some may consider this bad practice. Tags in Docker and tags in Git may not necessarily have the same meaning. Changes to the base images cannot be tracked in Git unless we store the sha sum of the base images in the Dockerfiles (-> update with renovate). With #281 the exact contents of a Docker image cannot be represented in Git anyway.

So let's first try to agree to an answer for question one. Maybe it's time to re-think or extend the Docker tagging strategy.
And then we can think about ways how to link image references in the Docker repo to tags, branches or commits in this Git repo.

@pabzm
Copy link
Member

pabzm commented Dec 17, 2024

I think the image-tags should definitely reference the Roundcubemail version. But maybe we can additionally include more details, by using container labels, or additional tags.

But to discuss that I still would like to know an actual use case for those details. Because without one we don't have any criteria (besides personal preference) for a decision, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants