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

  • For some reason I can't restart a script
  • docker-java/docker remote api block until container is finished
  • Save tables in Docker container
  • “CMD ['/home/user/']” in docker file doesn't work with docker-compose
  • JSON (config file) with dynamic variables
  • Openshift Job container image from internal registry
  • 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

  • Swarm: Manager in host + Worker in VM: No containers in workers
  • Docker disk memory : can I remove intermediate images?
  • How to handle web application static resources wich browser-cache in kubernetes?
  • how do you manage secret values with docker-compose v3.1?
  • docker exe into container does not show container id?
  • Docker freezes even in a small setup
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.