Internet stop working when start pihole docker

Hey,
I installed pihole as a docker container on my pi and when I run docker-compose up -d the internet connection on my pi stops:

$ curl google.com
curl: (7) Failed to connect to google.com port 80: No route to host
$ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
From 169.254.70.63 icmp_seq=1 Destination Host Unreachable
From 169.254.70.63 icmp_seq=2 Destination Host Unreachable
From 169.254.70.63 icmp_seq=3 Destination Host Unreachable

debug logs (no internet, can't upload): This process collects information from your Pi-hole, and optionally uploads it t - Pastebin.com

When I stop the container, the internet is back to normal.
I don't know what to do. I tried to fix this couple of days but failed.
Thanks

docker-compose.yml

version: "3"

services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "8080:80/tcp"
    environment:
      TZ: 'Asia/Jerusalem'
      FTLCONF_REPLY_ADDR4: '192.168.50.18'
    volumes:
      - './etc-pihole:/etc/pihole'
      - './etc-dnsmasq.d:/etc/dnsmasq.d'
    restart: unless-stopped
    dns:
      - 127.0.0.1
      - 1.1.1.1

You are pinging an IP address, with no involvement by your DNS server (Pi-hole). Failure to make this ping connection is not related to Pi-hole.

1 Like

Thanks for the answer jfb.
So why when I stop the container I can ping this IP successfully?

p.s: added my docker-compose file to the first message

You will need to look at the connectivity between the container and the internet.

1 Like

The host itself (the pi) doesn't have a connection to the internet.
Can you please give me a direction what to look for?

Visit the Pi forums - you can get good advice there for getting your Pi reliably connected to the internet.