chriscrowe / docker-pihole-unbound

Run Pi-Hole + Unbound on Docker
1.06k stars 276 forks source link

SOLUTION (not issue) - YML file support for QNAP Container Station using existing virtual switches/networks #65

Closed erwyman closed 2 years ago

erwyman commented 3 years ago

Hi there,

I'm fairly new to containers, and for that reason I probably fought this for longer than I would like to admit. With the existing YML file, QNAP tries to make a new Docker network and ultimately will not boot the app/container once created. No idea if this is the correct way to resolve this, but I managed to add some values to the YML file that allowed me to successfully deploy this project to an existing QNAP Virtual Switch using Container Station. I am unaware of how to use .env files for deployment with Container Station so I filled in the values directly into the YML file.

Note that I had to put double quotes around true for REV_SERVER:. Also, to get the docker network name I inspected another container that was using the virtual switch I wanted this to use, and verified by comparing/listing the docker networks, both from the command shell. (I think you can do this by SSH'ing to the QNAP, but I used the super_shell container app). See example YML below.

version: '2'

volumes: etc_pihole-unbound: etc_pihole_dnsmasq-unbound:

services: pihole: networks: ${DOCKER_NETWORK_NAME}: ipv4_address: ${ServerIP} container_name: pihole image: cbcrowe/pihole-unbound:latest hostname: ${HOSTNAME} domainname: ${DOMAIN_NAME} ports:

chriscrowe commented 2 years ago

Thanks for this 👍