Skip to content

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

Open
@JensWinkler91

Description

@JensWinkler91

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

Activity

lluisd

lluisd commented on Feb 20, 2024

@lluisd

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

JensWinkler91 commented on Mar 19, 2024

@JensWinkler91
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

heyromnivan commented on Apr 18, 2024

@heyromnivan

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

JRHemmen commented on Sep 2, 2024

@JRHemmen

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

linked a pull request that will close this issue on Nov 21, 2024
BenjaminFaal

BenjaminFaal commented on Nov 21, 2024

@BenjaminFaal

@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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @BenjaminFaal@lluisd@JRHemmen@JensWinkler91@heyromnivan

      Issue actions

        Update/Downgrade an container to a specific tag via http api mode · Issue #1932 · containrrr/watchtower