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

feat: filter containers seen by docker-gen #623

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

buchdag
Copy link
Member

@buchdag buchdag commented May 17, 2024

The PR add the -container-filter option to filter the containers that docker-gen will see.

The option work pretty much like -notify-filter and can be used multiple times to combine filters with AND.

This:

docker-gen \
    -container-filter status=running \
    -container-filter label=com.github.nginx-proxy.nginx \
    ./some/template.tmpl ./result.ext

will result in docker-gen only seeing running container that possess the label com.github.nginx-proxy.nginx.

Closes #276

Unfortunately Docker filter options for containers does not provide negative filtering, so #117, #210, and #252 won't be entirely fixed by this.

Thanks @tarasov65536 for the inspiration.

@buchdag buchdag self-assigned this May 17, 2024
@buchdag buchdag marked this pull request as draft May 17, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker stack filter
1 participant