Updated version, support for custom DNS server override env vars

This commit is contained in:
diginc
2016-04-25 23:18:41 -05:00
parent a7052c89b2
commit b0011d0a46
12 changed files with 182 additions and 153 deletions

View File

@@ -20,9 +20,11 @@ RUN apt-get -q update && \
# Original upstream pihole code being used
COPY ./pi-hole/gravity.sh /usr/local/bin/
COPY ./pi-hole/adlists.default /etc/pihole/
COPY ./pi-hole/pihole /usr/local/bin/
COPY ./pi-hole/advanced/Scripts/* /usr/local/bin/
COPY ./pi-hole/advanced/lighttpd.conf /etc/lighttpd/lighttpd.conf
COPY ./pi-hole/advanced/01-pihole.conf /etc/dnsmasq.conf
COPY ./pi-hole/advanced/dnsmasq.conf.original /etc/dnsmasq.conf
COPY ./pi-hole/advanced/01-pihole.conf /etc/dnsmasq.d/
COPY ./pi-hole/advanced/index.html /var/www/html/pihole/index.html
COPY ./AdminLTE /var/www/html/admin
COPY ./AdminLTE_version.txt /etc/
@@ -37,17 +39,20 @@ RUN mkdir -p /etc/pihole/ && \
touch /var/log/pihole.log && \
chmod 644 /var/log/pihole.log && \
chown dnsmasq:root /var/log/pihole.log && \
sed -i "s/@INT@/eth0/" /etc/dnsmasq.conf && \
sed -i "s/@DNS1@/8.8.8.8/" /etc/dnsmasq.conf && \
sed -i "s/@DNS2@/8.8.4.4/" /etc/dnsmasq.conf && \
sed -i "s/@INT@/eth0/" /etc/dnsmasq.d/01-pihole.conf && \
sed -i 's|"cd /etc/.pihole/ && git describe --tags --abbrev=0"|"cat /etc/pi-hole_version.txt"|g' /var/www/html/admin/footer.php && \
sed -i 's|"cd /var/www/html/admin/ && git describe --tags --abbrev=0"|"cat /etc/AdminLTE_version.txt"|g' /var/www/html/admin/footer.php
# This chould be eliminated if the files were +x in git
# This chould be eliminated if all (upstream) files were +x in git
RUN chmod +x /usr/local/bin/*.sh
# Fix just for docker
# Fix dnsmasq in docker
RUN grep -q '^user=root' || echo 'user=root' >> /etc/dnsmasq.conf
COPY ./debian/start.sh /
EXPOSE 53 53/udp
EXPOSE 80
ENTRYPOINT ["/tini", "--"]
CMD /start.sh