Skip to content

internal DNS has wrong ip address mappings  #1295

@BrianAdams

Description

@BrianAdams

Started two containers via docker-compose. 78b39860a0de (ip:172.23.0.3) and 8da0903d79a6 (ip:172.23.0.2). When I attempt to resolve the 8da0903d79a6 container from either the host or from container 78b39860a0de it gives me container 78b39860a0de ip.

docker exec -it 78b39860a0de ping -c1 8da0903d79a6
PING 8da0903d79a6 (172.23.0.3): 56 data bytes
64 bytes from 172.23.0.3: seq=0 ttl=64 time=0.048 ms

That should have been 172.23.0.2 returned from the internal DNS server but it was not.

docker --version
Docker version 1.12.0-rc2, build 906eacd, experimental
docker ps
CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS                                              NAMES
78b39860a0de        badevguru/dives_api   "/bin/sh -c '/bin/sh "   4 minutes ago       Up 4 minutes        3000/tcp, 0.0.0.0:5858->5858/tcp                   riak_dives-api_1
8da0903d79a6        badevguru/riakts      "/usr/lib/riak/riak-c"   11 hours ago        Up 6 minutes        0.0.0.0:32840->8087/tcp, 0.0.0.0:32839->8098/tcp   riak_riak-ts_1
docker exec -it 78b39860a0de cat /etc/hosts
127.0.0.1   localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.23.0.3  78b39860a0de
docker exec -it 8da0903d79a6 cat /etc/hosts
127.0.0.1   localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.23.0.2  8da0903d79a6

And the compose file:

version: "2"
services:
  riak-ts:
    image: badevguru/riakts
    ports:
      - "8087"
      - "8098"
    labels:
      - "com.basho.riakts.cluster.name=test"
    environment:
      - PRIMARY_NODE=riak-ts
  dives-api:
    image: badevguru/dives_api
    links:
      - riak-ts
    ports:
      - "5858:5858"
    environment:
      - RIAK_SERVER=riak-ts
      - DEBUG_FLAG=--debug-brk

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions