docker-gen
docker-gen copied to clipboard
feat: filter containers seen by docker-gen
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 and #252 won't be entirely fixed by this.
Thanks @tarasov65536 for the inspiration.