Revert "initial commit on configdir as volume"

This reverts commit c1fb17a645.

Signed-off-by: Adam Hill <adam@diginc.us>
This commit is contained in:
Adam Hill 2019-06-01 12:16:05 -05:00
parent 9cf80692d2
commit fd48454649
No known key found for this signature in database
GPG Key ID: 2193804FCA429855
8 changed files with 16 additions and 22 deletions

View File

@ -1,6 +1,5 @@
FROM {{ pihole.base }}
ENV CONFIG_DIR /etc/pihole
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/{{ pihole.s6_version }}/s6-overlay-{{ pihole.s6arch }}.tar.gz
COPY install.sh /usr/local/bin/install.sh
COPY VERSION /etc/docker-pi-hole-version
@ -45,6 +44,5 @@ LABEL maintainer="{{ pihole.maintainer }}"
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"
HEALTHCHECK CMD dig @127.0.0.1 pi.hole || exit 1
VOLUME $CONFIG_DIR
SHELL ["/bin/bash", "-c"]

View File

@ -1,6 +1,5 @@
FROM multiarch/debian-debootstrap:arm64-stretch-slim
ENV CONFIG_DIR /etc/pihole
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.7.0/s6-overlay-aarch64.tar.gz
COPY install.sh /usr/local/bin/install.sh
COPY VERSION /etc/docker-pi-hole-version
@ -45,6 +44,5 @@ LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"
HEALTHCHECK CMD dig @127.0.0.1 pi.hole || exit 1
VOLUME $CONFIG_DIR
SHELL ["/bin/bash", "-c"]

View File

@ -1,6 +1,5 @@
FROM pihole/debian-base:latest
ENV CONFIG_DIR /etc/pihole
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.7.0/s6-overlay-amd64.tar.gz
COPY install.sh /usr/local/bin/install.sh
COPY VERSION /etc/docker-pi-hole-version
@ -45,6 +44,5 @@ LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"
HEALTHCHECK CMD dig @127.0.0.1 pi.hole || exit 1
VOLUME $CONFIG_DIR
SHELL ["/bin/bash", "-c"]

View File

@ -1,6 +1,5 @@
FROM multiarch/debian-debootstrap:armel-stretch-slim
ENV CONFIG_DIR /etc/pihole
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.7.0/s6-overlay-arm.tar.gz
COPY install.sh /usr/local/bin/install.sh
COPY VERSION /etc/docker-pi-hole-version
@ -45,6 +44,5 @@ LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"
HEALTHCHECK CMD dig @127.0.0.1 pi.hole || exit 1
VOLUME $CONFIG_DIR
SHELL ["/bin/bash", "-c"]

View File

@ -1,6 +1,5 @@
FROM multiarch/debian-debootstrap:armhf-stretch-slim
ENV CONFIG_DIR /etc/pihole
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.7.0/s6-overlay-armhf.tar.gz
COPY install.sh /usr/local/bin/install.sh
COPY VERSION /etc/docker-pi-hole-version
@ -45,6 +44,5 @@ LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"
HEALTHCHECK CMD dig @127.0.0.1 pi.hole || exit 1
VOLUME $CONFIG_DIR
SHELL ["/bin/bash", "-c"]

View File

@ -54,7 +54,7 @@ prepare_configs() {
touch /var/log/pihole-FTL.log /run/pihole-FTL.pid /run/pihole-FTL.port /var/log/pihole.log
chown pihole:pihole /var/run/pihole /var/log/pihole
test -f /var/run/pihole/FTL.sock && rm /var/run/pihole/FTL.sock
chown pihole:pihole /var/log/pihole-FTL.log /run/pihole-FTL.pid /run/pihole-FTL.port $CONFIG_DIR $CONFIG_DIR/dhcp.leases /var/log/pihole.log
chown pihole:pihole /var/log/pihole-FTL.log /run/pihole-FTL.pid /run/pihole-FTL.port /etc/pihole /etc/pihole/dhcp.leases /var/log/pihole.log
chmod 0644 /var/log/pihole-FTL.log /run/pihole-FTL.pid /run/pihole-FTL.port /var/log/pihole.log
set -e
# Update version numbers
@ -116,7 +116,8 @@ setup_dnsmasq_dns() {
dnsType='custom'
fi;
if [ ! -f $CONFIG_DIR/.piholeFirstBoot ] ; then
# TODO With the addition of this to /start.sh this needs a refactor
if [ ! -f /.piholeFirstBoot ] ; then
local setupDNS1="$(grep 'PIHOLE_DNS_1' ${setupVars})"
local setupDNS2="$(grep 'PIHOLE_DNS_2' ${setupVars})"
setupDNS1="${setupDNS1/PIHOLE_DNS_1=/}"

View File

@ -1,6 +1,6 @@
#!/bin/bash -ex
mkdir -p $CONFIG_DIR/
mkdir -p /etc/pihole/
mkdir -p /var/run/pihole
# Production tags with valid web footers
export CORE_VERSION="$(cat /etc/docker-pi-hole-version)"
@ -83,12 +83,12 @@ else
fi
sed -i 's/readonly //g' /opt/pihole/webpage.sh
sed -i '/^WEBPASSWORD/d' $CONFIG_DIR/setupVars.conf
sed -i '/^WEBPASSWORD/d' /etc/pihole/setupVars.conf
# Replace the call to `updatePiholeFunc` in arg parse with new `unsupportedFunc`
sed -i $'s/helpFunc() {/unsupportedFunc() {\\\n echo "Function not supported in Docker images"\\\n exit 0\\\n}\\\n\\\nhelpFunc() {/g' /usr/local/bin/pihole
sed -i $'s/)\s*updatePiholeFunc/) unsupportedFunc/g' /usr/local/bin/pihole
touch $CONFIG_DIR/.piholeFirstBoot
touch /.piholeFirstBoot
echo 'Docker install successful'

View File

@ -15,7 +15,7 @@ export DNSMASQ_LISTENING_BEHAVIOUR="$DNSMASQ_LISTENING"
export IPv6
export WEB_PORT
export adlistFile='$CONFIG_DIR/adlists.list'
export adlistFile='/etc/pihole/adlists.list'
# The below functions are all contained in bash_functions.sh
. /bash_functions.sh
@ -27,12 +27,16 @@ echo " ::: Starting docker specific checks & setup for docker pihole/pihole"
docker_checks
# TODO:
#if [ ! -f /.piholeFirstBoot ] ; then
# echo " ::: Not first container startup so not running docker's setup, re-create container to run setup again"
#else
# regular_setup_functions
#fi
fix_capabilities
validate_env || exit 1
if [ -f $CONFIG_DIR/.piholeFirstBoot ] || [ -z "$(ls -A $CONFIG_DIR)" ] ; then
generate_password
validate_env || exit 1
prepare_configs
change_setting "IPV4_ADDRESS" "$ServerIP"
change_setting "IPV6_ADDRESS" "$ServerIPv6"
@ -44,9 +48,8 @@ setup_dnsmasq_hostnames "$ServerIP" "$ServerIPv6" "$HOSTNAME"
setup_ipv4_ipv6
setup_lighttpd_bind "$ServerIP"
setup_blocklists
fi
test_configs
[ -f $CONFIG_DIR/.piholeFirstBoot ] && rm $CONFIG_DIR/.piholeFirstBoot
[ -f /.piholeFirstBoot ] && rm /.piholeFirstBoot
echo " ::: Docker start setup complete"