File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ Environment Variables:
157157 DOCKER_CERT_PATH - directory path containing key.pem, cert.pem and ca.pem
158158 DOCKER_TLS_VERIFY - enable client TLS verification
159159 DOCKER_CONTAINER_FILTERS - comma separated list of container filters for inclusion by docker-gen.
160- Filters supplied through this variable override filters supplied through the -container-filter options .
160+ Filters supplied through this variable are ignored if -container-filter is provided .
161161```
162162
163163If no ` <dest> ` file is specified, the output is sent to stdout. Mainly useful for debugging.
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ Environment Variables:
8787 DOCKER_CERT_PATH - directory path containing key.pem, cert.pem and ca.pem
8888 DOCKER_TLS_VERIFY - enable client TLS verification
8989 DOCKER_CONTAINER_FILTERS - comma separated list of container filters for inclusion by docker-gen.
90- Filters supplied through this variable override filters supplied through the -container-filter options .
90+ Filters supplied through this variable are ignored if -container-filter is provided .
9191` )
9292 println (`For more information, see https://github.com/nginx-proxy/docker-gen` )
9393}
@@ -152,8 +152,8 @@ func initFlags() {
152152 flag .Usage = usage
153153 flag .Parse ()
154154
155- // override containerFilter with DOCKER_CONTAINER_FILTERS environment variable
156- if filtersEnvVar , found := os .LookupEnv ("DOCKER_CONTAINER_FILTERS" ); found && filtersEnvVar != "" {
155+ // set containerFilter with DOCKER_CONTAINER_FILTERS if it's set and no -container-filter option was provided
156+ if filtersEnvVar , found := os .LookupEnv ("DOCKER_CONTAINER_FILTERS" ); found && len ( containerFilter ) == 0 {
157157 var nonBlankFilters []string
158158
159159 for filter := range strings .SplitSeq (filtersEnvVar , "," ) {
You can’t perform that action at this time.
0 commit comments