Docker 1.13 DNS A-Record Lookup works with services but not with stack deploy

i have a problem with docker stack deploy with an application that makes DNS-A-Record lookup for cadvisor-instances running on the different docker hosts.

while it worked just fine when starting the services separately

  • All containers inside a digital ocean droplet stop
  • Docker Compose with PHP, MySQL, nginx connection issue
  • Proper handling of request_uri in double nginx reverse proxy?
  • docker login - Keep Session Alive on CI Server - Stay Logged In
  • How can I expose a Docker container port only to localhost so that it is also accessible via an ssh tunnel?
  • Update packages policy on RHEL6
  • cadvisor

    docker service create --network=custom_monitoring \
       --mode global --name cadvisor \
       --mount type=bind,source=/,target=/rootfs,readonly=true \
       --mount type=bind,source=/var/run,target=/var/run,readonly=false \
       --mount type=bind,source=/sys,target=/sys,readonly=true \
       --mount type=bind,source=/var/lib/docker/,target=/var/lib/docker,readonly=true google/cadvisor:latest

    my application (is public on docker-hub)

    docker service create --network=custom_monitoring \ 
       --publish 8080:8080 -e JAVA_OPTS="-Xmx256m -Dtarget.dnsname=tasks.cadvisor" \
       --name filter-proxy cproinger/sanalytics-filter-proxy

    deploying the services with the yml-file below and this docker command however

    docker stack deploy --compose-file myfile.yml mystack

    does not work (one can test with http://:8080/metrics, the response is not important just the log-output from the filter-proxy is which states if it could look up something with the dns-name). the sanalytics-filter-proxy does not get any DNS-Entries when querying for the cadvisor service (i also tried the dns names cadvisor, mystack_cadvisor, tasks.mystack_cadvisor and another service that does not use global mode (because i have another issue with that Docker 1.13 stack deploy with global service malfunction (target replicas increase without limit)) but since the lookup does not work for other services that do not have such an issue the DNS lookup has an issue of its own).

    version: "3"
    # monitoring services
        image: google/cadvisor:latest
          mode: global  
          - /:/rootfs:ro
          - /var/run:/var:ro
          - /sys/sys:ro
          - /var/lib/docker:/var/lib/docker:ro
          - app_overlay 
        image: cproinger/sanalytics-filter-proxy
          - "8080:8080"  
          - app_overlay
          - cadvisor
          - cep
          - JAVA_OPTS=-Xmx256m -Dsanalytics.slice.label=com.docker.stack.namespace -Dtarget.dnsname=tasks.cadvisor

    any suggestions why this does not work? am i just using the wrong dns-name or should i file a bug?

    i use docker 1.13 with experimental features switched on

  • Docker web terminal
  • How to load docker image from tar file
  • Cannot set up Kubernetes local cluster via Docker
  • Docker compose, link file outside container
  • dockerize django apache developer environment
  • Using nginx to reverse proxy to Docker services
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.