Docker Community Forums

Share and learn in the Docker community.

Docker bridge no internet connection

Hi guys,
running into a new issue for me. Have docker installed on Debian. All containers running fine in host mode. While in Bridge mode all containers cannot acces internet. Did bash into them. Nameserver is set correctly. Cannot Ping towards domain nor ip. Did rebuild bridge which did not solve the problem. Any help is greatly appreciated.

Best regards,
Tom

Just fyi: https://forum.openmediavault.org/index.php?thread/32947-omv-upgrade-from-4-to-5-docker-issues/#post242264

Have tried quiet a lot of stuff. Still running into this issue…

“nameserver 127.0.0.11” is just fine, if the dns server in the hosts /etc/resolv.conf points to a valid dns server that is able to resolve the query (in other words: if name resolution works on the host, it should do the same in the container). Sounds like something doesn’t work as suppossed in docker’s network magic. Can you tell wether your system uses nftables or iptables? See: iptables - Debian Wiki. Afaik, it needs to be iptables. I am not sure wether you need to restart the docker engine after switching to iptables.

That’s set just fine. I’m am really stunned. Never had a problem like that before…
IPtables is used.

So i checked /etc/docker/daemon.json
only Code inside is data-root: “/var/lib/docker”

when try to add dns and default-gateway I can save that file. When I restart docker though I only get an error until I set file as original…

Fyi using Odroid HC1 with OMV 5

I assume you are aware that json files require a terminating “,” at the end of each entry, except the laste one?

I Think i did.
Here is my input file:
{
“iptables”: true,
“default-gateway”: “192.168.2.1”,
“dns”: [“1.1.1.1”, “8.8.8.8”],
“data-root”: “/var/lib/docker”
}

When I restart docker i get the following error:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-06-09 13:12:14 CEST; 8s ago
Docs: https://docs.docker.com
Process: 10937 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 10937 (code=exited, status=1/FAILURE)

Jun 09 13:12:14 TOM-HC1 systemd[1]: docker.service: Service RestartSec=2s expired, scheduling restart.
Jun 09 13:12:14 TOM-HC1 systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Jun 09 13:12:14 TOM-HC1 systemd[1]: Stopped Docker Application Container Engine.
Jun 09 13:12:14 TOM-HC1 systemd[1]: docker.service: Start request repeated too quickly.
Jun 09 13:12:14 TOM-HC1 systemd[1]: docker.service: Failed with result ‘exit-code’.
Jun 09 13:12:14 TOM-HC1 systemd[1]: Failed to start Docker Application Container Engine.

I even cannot make the file original. Docker stil does not start. I have to do a reinstall basiclly in the webinterface:
Docker storage :: /var/lib/docker
Agent port:: 8000
Web port:: 9000
Opt-out :: 1
arch :: armhf
option :: docker
state :: install
extras :: 5.3.3
DNS OK.
Create override file …
Reload systemd daemon …
Skipping docker restart.
Done.

Only after that it does start again…

Your daemon.json looks about right. Though, I didn’t add any of those settings to my daemon.json. Mine only has data-root and a couple of settings to trim and locate the json logs.

There is definitly something fishy. I won’t be of any help here… good luck!

Mate you were right in the first place. I had nftables set. Just switched back to iptables and it works just fine.