Skip to content

add optional image tag filter #2054

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BenjaminFaal
Copy link

To be able to do finegrained updates to container running a specific tag of an image i added this.

closes #1932

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations on opening your first pull request! We'll get back to you as soon as possible. In the meantime, please make sure you've updated the documentation to reflect your changes and have added test automation as needed. Thanks! 🙏🏼

@Foxite
Copy link
Contributor

Foxite commented Apr 13, 2025

I originally wrote the code for the ?image parameter in #1289 and made it ignore the specific tag. To be honest, I forgot why I did it like that, and it's now causing problems for me.

What's the status on this? It looks good to me.

@BenjaminFaal
Copy link
Author

I am using this for a few months in production and it works.

@Foxite
Copy link
Contributor

Foxite commented Apr 13, 2025

I noticed this project seems dead; I'm examining forks by nicholas-fedor and beatkind to see if this can be incorporated there.

@Foxite
Copy link
Contributor

Foxite commented Apr 13, 2025

@BenjaminFaal are you hosting your fork image somewhere? If so, I think I'll just use yours.

Foxite added a commit to Foxite/nicholas-fedor-watchtower that referenced this pull request Apr 13, 2025
nicholas-fedor added a commit to nicholas-fedor/watchtower that referenced this pull request Apr 14, 2025
* adapt work from containrrr#2054

* feat: add image tag filtering to `FilterByImage` and update docs

- Refactor `FilterByImage` to support optional tag matching with helper function `matchImageAndTag`
- Add tests for malformed image inputs in `filters_test.go`
- Update `http-api-mode.md` to document tag support in /v1/update endpoint
- Add reference in `arguments.md` for tag filtering discoverability

* chore(filters): add missing newline to satisfy linting

* test(gotify): add gotify HTTP warning test to `notifier_test.go`

- Add test for insecure HTTP URL warning in gotify notifier initialization

* docs(readme): reorder recent contributor

---------

Co-authored-by: Nick Fedor <[email protected]>
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

Successfully merging this pull request may close these issues.

Update/Downgrade an container to a specific tag via http api mode
2 participants