I have recently been able to run PiHole on OpenWrt x86 using Docker. Before OpenWrt I had an Ubuntu Docker host which was running the PiHole container. The PiHole container was attached to the LAN network using Linux/Docker macvlan. Also for the Ubuntu Host to be able to ping the PiHole container, a workaround posted on stackoverflow was applied which creates a linux macvlan that the container uses. Giving PiHole an IP Address different than the IP Address of the host greatly simplifies the setu…
After Installing Docker I found
/etc/config/network
config interface 'docker'
option device 'docker0'
option proto 'none'
option auto '0'
config device
option type 'bridge'
option name 'docker0'
/etc/config/firewall
config zone 'docker'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option name 'docker'
list network 'docker'
They was not mentioned in:
Running PiHole on OpenWrt (x86/RPi) using Docker - Tutorial/Experiences
DGdodo
March 15, 2024, 10:09am
2
Mannshoch,
Did you also read the Docker Topic @ OpenWrt?
https://openwrt.org/docs/guide-user/virtualization/docker_host?s[]=docker
There network and firewall items are mentioned as you describe (podman instead of docker0 ).
And is maintained by people like you.
Regards, DG.
Thanks for the link.
do you know what an oci bundle or a veth pair is?
I plaxed around with docker according to Running PiHole on OpenWrt (x86/RPi) using Docker - Tutorial/Experiences
version: "3.3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
hostname: pihole
environment:
TZ: 'europa/zurich'
WEBPASSWORD: 'RT67)IJN'
# Volumes store your data between container upgrades
volumes:
- './pihole/etc-pihole/:/etc/pihole/'
- './pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/'
- './pihole/var-log/:/var/log'
- './pihole/etc-cont-init.d/10-fixroutes.sh:/etc/cont-init.d/10-fixroutes.sh'
# Recommended but not required (DHCP needs NET_ADMIN)
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
- NET_ADMIN
restart: unless-stopped
# ports:
# - "53:535/tcp"
# - "53:53/udp"
networks:
internal:
lan:
ipv4_address: 192.168.1.4
networks:
internal:
lan:
name: lan
driver: docker
driver_opts:
parent: docker0
ipam:
config:
- subnet: 192.168.1.0/24
# default:
# name: docker
Now I get the error Plugin docker not found
what does that mean?
driver
should be macvlan
. Not sure about the parent
being docker0
, I'm still on openwrt 21.02 x86_64.
network
config interface 'docker'
option device 'docker0.20'
option proto 'static'
option auto '0'
config device
option type 'bridge'
option name 'docker0.20'
option mode 'bridge'
option acceptlocal 1
config router
option interface 'docker0.20'
option targer '192.168.1.2'
option netmask '255.255.255.255'
firewall
config zone 'docker'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option name 'docker'
list network 'docker'
ERROR: invalid subinterface vlan name macvlan, example formatting is eth0.10
if I change it on docker-compose.yml
parents: docker0.20
I get:
ERROR: -o parent interface does was not found on the host: docker0
I never worked with VLAN until know.
Can you show your entire network
file?
grrr2
March 16, 2024, 2:28pm
8
are you using official openwrt? this section seems invalid.
I have written the config my self. I copied the config from the link, I rewrote them. What ever I try the error message is the same.
I corrected the mentioned text errors and get the same error message.
DGdodo
March 16, 2024, 11:47pm
10
Shouldn't that be 'target' instead?
DG.
Yes, as I wrote I corrected this error. also i removed the r in config router
the error:
ERROR: invalid subinterface vlan name macvlan, example formatting is eth0.10
is still the same.