default via 192.168.1.1 dev enp67s0f0 proto static
172.17.0.0/24 dev enp67s0f0 proto kernel scope link src 172.17.0.1
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
192.168.1.0/24 dev enp67s0f0 proto kernel scope link src 192.168.1.32 ```
8. `iptables` look ok to me:
my_user@my_host:~$ sudo iptables --list --table nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DOCKER all -- anywhere anywhere ADDRTYPE match dst-type LOCAL
Chain INPUT (policy ACCEPT) target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
DOCKER all -- anywhere !127.0.0.0/8 ADDRTYPE match dst-type LOCAL
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 172.17.0.0/16 anywhere
Chain DOCKER (2 references)
target prot opt source destination
RETURN all -- anywhere anywhere
iptables
look ok to me:
my_user@my_host:~$ sudo iptables --list --table nat
9Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DOCKER all -- anywhere anywhere ADDRTYPE match dst-type LOCAL
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
DOCKER all -- anywhere !127.0.0.0/8 These are my current docker networks: ADDRTYPE match dst-type LOCAL
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 172.17.0.0/16 anywhere
Chain DOCKER (2 references)
target prot opt source destination
RETURN all -- anywhere anywhere
NETWORK ID NAME DRIVER SCOPE ba15db4d2831 bridge bridge local 938ad254f4d2 host host local 72ca52dfdedb none null local
- These are my current docker networks:
Finally, if I run the container in host mode (for instance: ` docker run -it --rm --net=host python:3.6.1 /bin/bash`), DNS resolution works.
It cannot be as simple as appending `--net=host` to my docker commands because this server run some CI/CDNETWORK pipelinesID that should be able toNAME reach internet, resolve domain names and soDRIVER on and so forth.
SCOPE
So basically, the main question is **howba15db4d2831 can I fix the bridge docker0 to be able to reach internet from my containers when in network mode bridge?**
I have tried several thingslocal
938ad254f4d2 among which ithost was restoring docker, reinstalling docker, removing the `docker0`host iface and forcing docker to create it again.
local
Any72ca52dfdedb help, feedback or commentsnone on how to solve or troubleshootnull this will be much appreciated! local
Finally, if I run the container in host mode (for instance: docker run -it --rm --net=host python:3.6.1 /bin/bash
), DNS resolution works.
It cannot be as simple as appending --net=host
to my docker commands because this server run some CI/CD pipelines that should be able to reach internet, resolve domain names and so on and so forth.
So basically, the main question is how can I fix the bridge docker0 to be able to reach internet from my containers when in network mode bridge?
I have tried several things among which it was restoring docker, reinstalling docker, removing the docker0
iface and forcing docker to create it again.
Any help, feedback or comments on how to solve or troubleshoot this will be much appreciated!