Fixing issues with 1.9.2

- Case on IPv4addr was incorrect, gravity now requires it instead of piholeIP file
- debian:jessie no longer had dnsutils dig?  odd.
- py.test always pull the latest docker images to help reveal base image changes like above
- py.test stubbing of gravity was acciently not present in debian arm's start.sh
- pihole submodule using development branch latest
This commit is contained in:
diginc 2016-10-06 18:51:05 -05:00
parent e8b32168b6
commit 822903189c
7 changed files with 17 additions and 14 deletions

View File

@ -6,7 +6,7 @@ fi;
# /tmp/piholeIP is the current override of auto-lookup in gravity.sh
echo "$ServerIP" > /etc/pihole/piholeIP;
echo "ipv4addr=$ServerIP" > /etc/pihole/setupVars.conf;
echo "IPv4addr=$ServerIP" > /etc/pihole/setupVars.conf;
echo "piholeIPv6=$ServerIPv6" >> /etc/pihole/setupVars.conf;
if [ ! -f /var/run/dockerpihole-firstboot ] ; then
@ -37,7 +37,7 @@ fi;
echo "Using $dnsType DNS servers: $DNS1 & $DNS2"
sed -i "s/@DNS1@/$DNS1/" /etc/dnsmasq.d/01-pihole.conf && \
sed -i "s/@DNS2@/$DNS2/" /etc/dnsmasq.d/01-pihole.conf && \
sed -i "s/@DNS2@/$DNS2/" /etc/dnsmasq.d/01-pihole.conf
ip_versions="IPv4 and IPv6"
if [ "$IPv6" != "True" ] ; then

View File

@ -9,7 +9,7 @@ RUN apt-get -q update && \
dnsmasq \
lighttpd \
php5-common php5-cgi php5 \
bc curl unzip wget sudo && \
bc curl unzip wget sudo dnsutils && \
rm -rf /var/cache/apt/archives
# Original upstream pihole code being used

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
if [ -z "$ServerIP" ] ; then
echo "ERROR: To function correctly you must pass an environment variables of 'ServerIP' into the docker container with the IP of your docker host from which you are passing web (80) and dns (53) ports from"
exit 1
@ -6,7 +6,7 @@ fi;
# /tmp/piholeIP is the current override of auto-lookup in gravity.sh
echo "$ServerIP" > /etc/pihole/piholeIP;
echo "ipv4addr=$ServerIP" > /etc/pihole/setupVars.conf;
echo "IPv4addr=$ServerIP" > /etc/pihole/setupVars.conf;
echo "piholeIPv6=$ServerIPv6" >> /etc/pihole/setupVars.conf;
if [ ! -f /var/run/dockerpihole-firstboot ] ; then
@ -35,11 +35,13 @@ fi;
echo "Using $dnsType DNS servers: $DNS1 & $DNS2"
sed -i "s/@DNS1@/$DNS1/" /etc/dnsmasq.d/01-pihole.conf && \
sed -i "s/@DNS2@/$DNS2/" /etc/dnsmasq.d/01-pihole.conf && \
sed -i "s/@DNS2@/$DNS2/" /etc/dnsmasq.d/01-pihole.conf
dnsmasq --test -7 /etc/dnsmasq.d || exit 1
lighttpd -t -f /etc/lighttpd/lighttpd.conf || exit 1
if [ -n "$PYTEST" ] ; then sed -i 's/^gravity_spinup/#donotcurl/g' `which gravity.sh`; fi;
gravity.sh # dnsmasq start included
service lighttpd start

View File

@ -14,7 +14,7 @@ RUN apt-get -q update && \
dnsmasq \
lighttpd \
php5-common php5-cgi php5 \
bc curl unzip wget sudo && \
bc curl unzip wget sudo dnsutils && \
rm -rf /var/cache/apt/archives
# Original upstream pihole code being used

2
debian/start.sh vendored
View File

@ -6,7 +6,7 @@ fi;
# /tmp/piholeIP is the current override of auto-lookup in gravity.sh
echo "$ServerIP" > /etc/pihole/piholeIP;
echo "ipv4addr=$ServerIP" > /etc/pihole/setupVars.conf;
echo "IPv4addr=$ServerIP" > /etc/pihole/setupVars.conf;
echo "piholeIPv6=$ServerIPv6" >> /etc/pihole/setupVars.conf;
if [ ! -f /var/run/dockerpihole-firstboot ] ; then

@ -1 +1 @@
Subproject commit 6eedfb572e474e7a88f8dc6526ffee7ff8979559
Subproject commit ca0cbd68d613c8eefeacad0848022b1be70a8784

View File

@ -6,12 +6,13 @@ run_local = testinfra.get_backend(
"local://"
).get_module("Command").run
@pytest.mark.parametrize("image,tag", [
( 'alpine.docker', 'diginc/pi-hole:alpine' ),
( 'debian.docker', 'diginc/pi-hole:debian' ),
( 'debian-armhf.docker', 'diginc/pi-hole-armhf:debian' ),
@pytest.mark.parametrize("upstream,image,tag", [
( 'alpine:edge', 'alpine.docker', 'diginc/pi-hole:alpine' ),
( 'debian:jessie', 'debian.docker', 'diginc/pi-hole:debian' ),
( 'jsurf/rpi-raspbian', 'debian-armhf.docker', 'diginc/pi-hole-armhf:debian' ),
])
def test_build_pihole_image(image, tag):
def test_build_pihole_image(upstream, image, tag):
run_local('docker pull {}'.format(upstream))
build_cmd = run_local('docker build -f {} -t {} .'.format(image, tag))
if build_cmd.rc != 0:
print build_cmd.stdout