Host DNS not working with docker container

I have a probleme with docker on my archlinux kernel Linux 4.19.31-1-lts #1 SMP Sun Mar 24 09:29:16 CET 2019 x86_64 GNU/Linux

$ docker info return :

$ docker info                                                                                                                                                                       
Containers: 46
 Running: 0
 Paused: 0
 Stopped: 46
Images: 1
Server Version: 18.09.3-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84.m
runc version: ccb5efd37fb7c86364786e9137e22948751de7ed-dirty
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.19.31-1-lts
Operating System: Arch Linux
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.54GiB
Name: kermipc
ID: 5HFD:A2HY:5RBD:OK2D:OQ2R:KQFY:AW6F:MNES:CAX4:O2NC:2NXO:OOGX
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

$ ip a look like :

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 38:2c:4a:be:1d:d0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.10/24 brd 192.168.1.255 scope global dynamic noprefixroute enp3s0
       valid_lft 82509sec preferred_lft 82509sec
    inet6 2a01:cb1c:556:7f00:39c4:7c42:ae64:a6d4/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 1749sec preferred_lft 549sec
    inet6 fe80::3a2c:4aff:febe:1dd0/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
66: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:db:68:f0:17 brd ff:ff:ff:ff:ff:ff
    inet 172.18.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever

Docker is correctly bridged :

$ docker run alpine ping 8.8.8.8                                                                                                                                                           
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=119 time=2.012 ms
64 bytes from 8.8.8.8: seq=1 ttl=119 time=1.910 ms
64 bytes from 8.8.8.8: seq=2 ttl=119 time=5.877 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 1.910/3.266/5.877 ms

But dns is not working :

$ docker run alpine ping google.com                                                                                                                                                        
ping: bad address 'google.com'

/etc/dnsmasq.conf look like :

address=/local.lan/127.0.0.1
user=nobody
group=nobody
no-dhcp-interface=
# listen-address=127.0.0.1,172.18.0.1
interface=lo
interface=docker0
bind-interfaces
log-dhcp
log-queries
log-facility=/var/log/dnsmasq.log

/etc/resolv.conf look like :

#Generated by NetworkManager
search 8.8.4.4
nameserver 192.168.1.1
nameserver 127.0.0.1
nameserver 172.18.0.1

When i do a docker run alpine ping google.com i can see with log file that dnsmasq correcty resolve dns. Any ideas ?

Edit 1 :

docker run --rm -it alpine cat /etc/resolv.conf say :

# Generated by NetworkManager
search 8.8.4.4
nameserver 192.168.1.1
nameserver 172.18.0.1

Looks like you forgot to configure IPv6 on the Docker network.

You're right, all my problems gone away, solution is :

In /etc/dhcpcd.conf remove or comment :

noipv4ll

Then restart docker :

sudo systemctl restart docker

Looks like you forgot to configure IPv6 on the Docker network.

I googled that but i don’t find anything, please can you tell me more ?

If you what does your /etc/resolv.conf look like inside an alpine container? docker run --rm -it alpine cat /etc/resolv.conf