The guide DHCP with docker-compose and bridge networking is very well written and I think I followed all the steps correctly. But the alpine container seems to be unable to get an internet connection. I tried to add a custom mirror to make sure it's not a mirror related issue but it still won't work.
BEFORE:
Step 2/4 : RUN apk --no-cache add dhcp-helper
---> Running in a05cbbae0426
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/armv7/APKINDEX.tar.gz
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/main: temporary error (try again later)
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/armv7/APKINDEX.tar.gz
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/community: temporary error (try again later)
AFTER:
---> 399ad3d21895
Step 2/5 : RUN echo http://pkg.adfinis.com/alpine/latest-stable/main > /etc/apk/repositories; echo http://pkg.adfinis.com/alpine/latest-stable/community >> /etc/apk/repositories; apk update
---> Running in 9e3901f78f6d
fetch http://pkg.adfinis.com/alpine/latest-stable/main/armv7/APKINDEX.tar.gz
ERROR: http://pkg.adfinis.com/alpine/latest-stable/main: temporary error (try again later)
WARNING: Ignoring http://pkg.adfinis.com/alpine/latest-stable/main: No such file or directory
fetch http://pkg.adfinis.com/alpine/latest-stable/community/armv7/APKINDEX.tar.gz
ERROR: http://pkg.adfinis.com/alpine/latest-stable/community: temporary error (try again later)
WARNING: Ignoring http://pkg.adfinis.com/alpine/latest-stable/community: No such file or directory
I tried this with my own compose file but tried it later with yours too. I also compared mine to yours with vimdiff to make sure that I do not have any syntax errors in my file.
The internet connection on the Pi itself works flawlessly.
My compose file looks like this and I'm building it with docker-compose up
. I hope this is correct.:
version: "3"
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
#- "8080:80/tcp"
dns:
- 1.1.1.1
environment:
TZ: "${TZ}"
WEBPASSWORD: "${WEBPASSWORD}"
ServerIP: 192.168.0.10
DNS1: 1.1.1.1
DNS2: 1.0.0.1
VIRTUAL_HOST: pi.hole
DNSMASQ_LISTENING: all
volumes:
- '/opt/pihole/etc-pihole/:/etc/pihole/'
- '/opt/pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/'
- '/opt/pihole/var-log/pihole.log:/var/log/pihole.log'
cap_add:
- NET_ADMIN
restart: unless-stopped
depends_on:
- dhcphelper
networks:
backend:
ipv4_address: '172.31.0.100'
frontproxy_proxy-tier: {}
dhcphelper:
container_name: dhcphelper
build: ./dhcp-helper
restart: unless-stopped
network_mode: "host"
command: -s 172.31.0.100
cap_add:
- NET_ADMIN
networks:
backend:
ipam:
config:
- subnet: 172.31.0.0/16
frontproxy_proxy-tier:
external: true