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

Update/Downgrade an container to a specific tag via http api mode #1932

Open
JensWinkler91 opened this issue Feb 20, 2024 · 5 comments · May be fixed by #2054
Open

Update/Downgrade an container to a specific tag via http api mode #1932

JensWinkler91 opened this issue Feb 20, 2024 · 5 comments · May be fixed by #2054

Comments

@JensWinkler91
Copy link

Is your feature request related to a problem? Please describe.

I'd like to update OR downgrade a specific container via http mode.
I'm using localhost:8080/v1/update?images=<image_name> to update my containers via http.
However, in case the new container contain any errors I'd like to downgrade them again to the tag that was used before.

Describe the solution you'd like

Allow to add an image name with a certain tag.
In this way we could define which tag should be used.

Example:
localhost:8080/v1/update?images=<image_name>:<tag>

Describe alternatives you've considered

Another possibility would be an api call "downgrade". The approach, however, would be less flexible as it would only reset the container to the penultimate tag.

Example:
localhost:8080/v1/downgrade?images=<image_name>

Additional context

No response

@lluisd
Copy link

lluisd commented Feb 20, 2024

It will be nice to have an API endpoint to manually update an specific container, that is in monitory only mode, to the last image available. To avoid to manually update the stale ones that I don't want to update it automatically.

image

I know that I can run multiple instances of watchtower with diferent scopes but I only want to update manually an specific container.

So considering the endpoint like localhost:8080/v1/update?images=<image_name> to keep it simple for now.

@JensWinkler91
Copy link
Author

Maybe i get you wrong but i think you can already update certain containers via API: curl -H "Authorization: Bearer mytoken" localhost:8080/v1/update?image=foo/bar,foo/baz (https://github.com/containrrr/watchtower/blob/main/docs/http-api-mode.md)

The feature I'm missing is to update a container with a specific tag.
Can anyone tell me if this feature will be coming in the future?

@heyromnivan
Copy link

I would also add a usecase - we have several environments where service is running (dev, test, live, etc) and we'd like a finer control over which version (tag) is deployed where.
Our current solution is just build+push+trigger watchtower in the same CI pipeline run, to make it unlikely for someone elses image version slipping in before watchtower checks for updates. But that's a lot of overhead.

@JRHemmen
Copy link

JRHemmen commented Sep 2, 2024

+1 for this, would be nice to be able to use watchtower with specific version tags rather than relying on latest

@BenjaminFaal BenjaminFaal linked a pull request Nov 21, 2024 that will close this issue
@BenjaminFaal
Copy link

@heyromnivan @JRHemmen i just added this in #2054

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

Successfully merging a pull request may close this issue.

5 participants