Tengo un problema con docker en mi kernel archlinux Linux 4.19.31-1-lts #1 SMP Sun Mar 24 09:29:16 CET 2019 x86_64 GNU/Linux
$ docker info
devolver :
$ docker info Containers: 46 Running: 0 Paused: 0 Stopped: 46Images: 1Server Version: 18.09.3-ceStorage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: falseLogging Driver: json-fileCgroup Driver: cgroupfsPlugins: Volume: local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslogSwarm: inactiveRuntimes: runcDefault Runtime: runcInit Binary: docker-initcontainerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84.mrunc version: ccb5efd37fb7c86364786e9137e22948751de7ed-dirtyinit version: fec3683Security Options: seccomp Profile: defaultKernel Version: 4.19.31-1-ltsOperating System: Arch LinuxOSType: linuxArchitecture: x86_64CPUs: 4Total Memory: 15.54GiBName: kermipcID: 5HFD:A2HY:5RBD:OK2D:OQ2R:KQFY:AW6F:MNES:CAX4:O2NC:2NXO:OOGXDocker Root Dir: /var/lib/dockerDebug Mode (client): falseDebug Mode (server): falseRegistry: https://index.docker.io/v1/Labels:Experimental: falseInsecure Registries: 127.0.0.0/8Live Restore Enabled: false
$ ip a
parece :
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 forever2: 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 forever66: 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 está correctamente puenteado :
$ docker run alpine ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8): 56 data bytes64 bytes from 8.8.8.8: seq=0 ttl=119 time=2.012 ms64 bytes from 8.8.8.8: seq=1 ttl=119 time=1.910 ms64 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 lossround-trip min/avg/max = 1.910/3.266/5.877 ms
Pero dns no funciona :
$ docker run alpine ping google.com ping: bad address 'google.com'
/etc/dnsmasq.conf
parece :
address=/local.lan/127.0.0.1user=nobodygroup=nobodyno-dhcp-interface=# listen-address=127.0.0.1,172.18.0.1interface=lointerface=docker0bind-interfaceslog-dhcplog-querieslog-facility=/var/log/dnsmasq.log
/etc/resolv.conf
parece :
#Generated by NetworkManagersearch 8.8.4.4nameserver 192.168.1.1nameserver 127.0.0.1nameserver 172.18.0.1
Cuando hago un docker run alpine ping google.com
puedo ver con el archivo de registro que dnsmasq resuelve correctamente el DNS.Alguna idea ?
Edición 1 :
docker run --rm -it alpine cat /etc/resolv.conf
decir :
# Generated by NetworkManagersearch 8.8.4.4nameserver 192.168.1.1nameserver 172.18.0.1