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.
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:
- 5335:5335/tcp # Uncomment to enable unbound access on local server
- 22/tcp # Uncomment to enable SSH
environment: ServerIP: ${ServerIP} TZ: ${TZ} WEBPASSWORD: ${WEBPASSWORD} REV_SERVER: "${REV_SERVER}" REV_SERVER_TARGET: ${REV_SERVER_TARGET} REV_SERVER_DOMAIN: ${REV_SERVER_DOMAIN} REV_SERVER_CIDR: ${REV_SERVER_CIDR} DNS1: 127.0.0.1#5335 # Hardcoded to our Unbound server DNS2: 127.0.0.1#5335 # Hardcoded to our Unbound server DNSSEC: "true" # Enable DNSSEC volumes:
etc_pihole_dnsmasq-unbound:/etc/dnsmasq.d:rw restart: unless-stopped
networks: ${DOCKER_NETWORK_NAME}: external: name: ${DOCKER_NETWORK_NAME}