Wildcard for noProxy container names?

I have a number of microservices in my docker-compose.yml. In the .yml each microservice container is named with the convention "{something}-service".

Some of them need to use our company proxy to access the internet to download data, some of them access each other via HTTP REST API.

I configured the proxy in the c:\users\{user}\.docker/config.json file, e.g.:

  "auths": { "https://index.docker.io/v1/": {} },
  "credsStore": "desktop",
  "stackOrchestrator": "swarm",
  "proxies": {
    "default": {
      "httpProxy": "http://proxy.company.com:port",
      "httpsProxy": "http://proxy.company.com:port",
      "noProxy": "abc-service, def-service, ghi-service"

This works fine, but rather than naming each microservice in the noProxy, can they be wildcarded? I tried "*-service" but that didn’t work in my case.

Any suggestions how to wildcard multiple container names in the noProxy param?

1 Like

I have the same question! I’ve been unable to find a solution other than manually listing out all the internal service names.

Personally I think it’s ridiculous that Docker sends DNS requests to the proxy before checking for the hostname in it’s own internal DNS service.