compose icon indicating copy to clipboard operation
compose copied to clipboard

"dns" property should resolve container names into IPs

Open ostretsov opened this issue 10 years ago • 2 comments

The last line in the following listing might describe my issue:

dnsdock:
  image: tonistiigi/dnsdock
  volumes:
      - /var/run/docker.sock:/var/run/docker.sock

# other stuff ...

php:
  build: ./docker/php
  expose:
    - 9000
  ports:
    - "8080:8080"
    - "10050:10050"
  volumes_from:
    - code
  volumes:
    - /etc/localtime:/etc/localtime:ro
    - ./var/logs/supervisor:/var/log/supervisor
    - ./docker/php/supervisor:/etc/supervisor/conf.d
    - ./docker/php/boot:/etc/my_init.d
    - ./docker/php/mods/xdebug.ini:/etc/php5/mods-available/xdebug.ini:ro
    - ./docker/php/zabbix/zabbix_agentd.conf:/etc/zabbix/zabbix_agentd.conf
    - ./docker/php/pool.d/symfony.pool.conf:/etc/php5/fpm/pool.d/symfony.pool.conf
    - ./docker/home/.bashrc:/var/www/.bashrc:ro
    - ./data/.bash_history:/var/www/.bash_history
  links:
    - postgres
    - redis
    - rabbitmq
    - elasticsearch
    - mailcatcher
    - dnsdock
  dns:
    - dnsdock # it's the container name, but now it doesn't work properly

Unfortunately now it's impossible to specify container name in "dns" section. docker-compose will just insert "nameserver dnsdock" into /etc/resolv.conf.

ostretsov avatar Jan 26 '16 06:01 ostretsov

We've had a request for this before (I'm having trouble finding the issue now, but I'm sure it exists). I believe we closed the issue as wont fix.

With 1.6 there shouldn't be any need for services like dnsdock anymore. Docker 1.10 comes with an embedded dns server which is used for dns.

dnephin avatar Jan 26 '16 14:01 dnephin

Thanks a lot! On 26 Jan 2016 5:57 pm, "Daniel Nephin" [email protected] wrote:

We've had a request for this before (I'm having trouble finding the issue now, but I'm sure it exists). I believe we closed the issue as wont fix.

With 1.6 there shouldn't be any need for services like dnsdock anymore. Docker 1.10 comes with an embedded dns server which is used for dns.

— Reply to this email directly or view it on GitHub https://github.com/docker/compose/issues/2752#issuecomment-175058454.

ostretsov avatar Jan 26 '16 17:01 ostretsov