Add in install option for FTLDNS
This commit is contained in:
parent
3bf7992e52
commit
60bd77f586
|
@ -27,7 +27,7 @@ THIS_DIR = os.path.dirname(os.path.abspath(__file__))
|
|||
base_vars = {
|
||||
'name': 'diginc/pi-hole',
|
||||
'maintainer' : 'adam@diginc.us',
|
||||
's6_version' : 'v1.21.2.2',
|
||||
's6_version' : 'v1.21.4.0',
|
||||
}
|
||||
|
||||
os_base_vars = {
|
||||
|
@ -111,6 +111,7 @@ def build(docker_repo, os, arch, args):
|
|||
build_result = run_local(build_command)
|
||||
if args['-v']:
|
||||
print build_result.stdout
|
||||
print build_result.stderr
|
||||
if build_result.rc != 0:
|
||||
print " ::: Building {} encountered an error".format(dockerfile)
|
||||
print build_result.stderr
|
||||
|
|
|
@ -14,13 +14,13 @@ ENV PIHOLE_INSTALL /tmp/ph_install.sh
|
|||
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/{{ pihole.s6_version }}/s6-overlay-{{ pihole.arch }}.tar.gz
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget curl net-tools cron procps && \
|
||||
curl -L -s $S6OVERLAY_RELEASE \
|
||||
| tar xvzf - -C / && \
|
||||
docker-install.sh && \
|
||||
apt-get install -y curl && \
|
||||
curl -L -s $S6OVERLAY_RELEASE | tar xvzf - -C / && \
|
||||
rm -rf /var/cache/apt/archives /var/lib/apt/lists/* && \
|
||||
mv /init /s6-init
|
||||
|
||||
RUN apt-get update && bash -ex docker-install.sh 2>&1
|
||||
|
||||
ENTRYPOINT [ "/s6-init" ]
|
||||
|
||||
ADD s6/{{ pihole.os }}-root /
|
||||
|
|
|
@ -11,16 +11,16 @@ ENV PATH /opt/pihole:${PATH}
|
|||
COPY install.sh /usr/local/bin/docker-install.sh
|
||||
ENV setupVars /etc/pihole/setupVars.conf
|
||||
ENV PIHOLE_INSTALL /tmp/ph_install.sh
|
||||
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.2/s6-overlay-aarch64.tar.gz
|
||||
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.4.0/s6-overlay-aarch64.tar.gz
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget curl net-tools cron procps && \
|
||||
curl -L -s $S6OVERLAY_RELEASE \
|
||||
| tar xvzf - -C / && \
|
||||
docker-install.sh && \
|
||||
apt-get install -y curl && \
|
||||
curl -L -s $S6OVERLAY_RELEASE | tar xvzf - -C / && \
|
||||
rm -rf /var/cache/apt/archives /var/lib/apt/lists/* && \
|
||||
mv /init /s6-init
|
||||
|
||||
RUN apt-get update && bash -ex docker-install.sh 2>&1
|
||||
|
||||
ENTRYPOINT [ "/s6-init" ]
|
||||
|
||||
ADD s6/debian-root /
|
||||
|
|
|
@ -11,16 +11,16 @@ ENV PATH /opt/pihole:${PATH}
|
|||
COPY install.sh /usr/local/bin/docker-install.sh
|
||||
ENV setupVars /etc/pihole/setupVars.conf
|
||||
ENV PIHOLE_INSTALL /tmp/ph_install.sh
|
||||
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.2/s6-overlay-amd64.tar.gz
|
||||
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.4.0/s6-overlay-amd64.tar.gz
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget curl net-tools cron procps && \
|
||||
curl -L -s $S6OVERLAY_RELEASE \
|
||||
| tar xvzf - -C / && \
|
||||
docker-install.sh && \
|
||||
apt-get install -y curl && \
|
||||
curl -L -s $S6OVERLAY_RELEASE | tar xvzf - -C / && \
|
||||
rm -rf /var/cache/apt/archives /var/lib/apt/lists/* && \
|
||||
mv /init /s6-init
|
||||
|
||||
RUN apt-get update && bash -ex docker-install.sh 2>&1
|
||||
|
||||
ENTRYPOINT [ "/s6-init" ]
|
||||
|
||||
ADD s6/debian-root /
|
||||
|
|
|
@ -11,16 +11,16 @@ ENV PATH /opt/pihole:${PATH}
|
|||
COPY install.sh /usr/local/bin/docker-install.sh
|
||||
ENV setupVars /etc/pihole/setupVars.conf
|
||||
ENV PIHOLE_INSTALL /tmp/ph_install.sh
|
||||
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.2/s6-overlay-armhf.tar.gz
|
||||
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.4.0/s6-overlay-armhf.tar.gz
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget curl net-tools cron procps && \
|
||||
curl -L -s $S6OVERLAY_RELEASE \
|
||||
| tar xvzf - -C / && \
|
||||
docker-install.sh && \
|
||||
apt-get install -y curl && \
|
||||
curl -L -s $S6OVERLAY_RELEASE | tar xvzf - -C / && \
|
||||
rm -rf /var/cache/apt/archives /var/lib/apt/lists/* && \
|
||||
mv /init /s6-init
|
||||
|
||||
RUN apt-get update && bash -ex docker-install.sh 2>&1
|
||||
|
||||
ENTRYPOINT [ "/s6-init" ]
|
||||
|
||||
ADD s6/debian-root /
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/bin/bash -ex
|
||||
# Script for manually pushing the docker arm images for diginc only
|
||||
# (no one else has docker repo permissions)
|
||||
if [ ! -f ~/.docker/config.json ] ; then
|
||||
|
@ -7,7 +7,7 @@ if [ ! -f ~/.docker/config.json ] ; then
|
|||
fi
|
||||
|
||||
if [[ "$1" == 'prod' ]] ; then
|
||||
export version='3.3'
|
||||
export version="${latest}"
|
||||
for tag in debian_armhf debian_aarch64; do
|
||||
# Verison specific tags for ongoing history
|
||||
docker tag pi-hole-multiarch:$tag diginc/pi-hole-multiarch:v${version}_${tag}
|
||||
|
|
59
install.sh
59
install.sh
|
@ -4,10 +4,12 @@ mkdir -p /var/run/pihole
|
|||
export CORE_TAG='v3.3.1'
|
||||
export WEB_TAG='v3.3'
|
||||
export FTL_TAG='v3.0'
|
||||
export USE_FTLDNS_BRANCHES=true
|
||||
export USE_DEVELOPMENT_BRANCHES=false
|
||||
|
||||
if [[ $USE_DEVELOPMENT_BRANCHES == true ]] ; then
|
||||
# install from custom hash or branch
|
||||
if [[ $USE_FTLDNS_BRANCHES == true ]] ; then
|
||||
CORE_TAG='FTLDNS'
|
||||
elif [[ $USE_DEVELOPMENT_BRANCHES == true ]] ; then
|
||||
CORE_TAG='development'
|
||||
fi
|
||||
|
||||
|
@ -19,20 +21,36 @@ which systemctl && mv "$(which systemctl)" /bin/no_systemctl
|
|||
which debconf-apt-progress && mv "$(which debconf-apt-progress)" /bin/no_debconf-apt-progress
|
||||
|
||||
# Get the install functions
|
||||
wget -O "$PIHOLE_INSTALL" https://raw.githubusercontent.com/pi-hole/pi-hole/${CORE_TAG}/automated%20install/basic-install.sh
|
||||
curl https://raw.githubusercontent.com/pi-hole/pi-hole/${CORE_TAG}/automated%20install/basic-install.sh > "$PIHOLE_INSTALL"
|
||||
PH_TEST=true . "${PIHOLE_INSTALL}"
|
||||
|
||||
# Run only what we need from installer
|
||||
# Preseed variables to assist with using --unattended install
|
||||
{
|
||||
echo "PIHOLE_INTERFACE=eth0"
|
||||
echo "IPV4_ADDRESS=0.0.0.0"
|
||||
echo "IPV6_ADDRESS=0:0:0:0:0:0"
|
||||
echo "PIHOLE_DNS_1=8.8.8.8"
|
||||
echo "PIHOLE_DNS_2=8.8.4.4"
|
||||
echo "QUERY_LOGGING=true"
|
||||
echo "INSTALL_WEB_SERVER=true"
|
||||
echo "INSTALL_WEB_INTERFACE=true"
|
||||
echo "LIGHTTPD_ENABLED=true"
|
||||
}>> "${setupVars}"
|
||||
source $setupVars
|
||||
|
||||
export USER=pihole
|
||||
if [[ "$TAG" == 'debian' ]] ; then
|
||||
distro_check
|
||||
install_dependent_packages INSTALLER_DEPS[@]
|
||||
install_dependent_packages PIHOLE_DEPS[@]
|
||||
install_dependent_packages PIHOLE_WEB_DEPS[@]
|
||||
sed -i "/sleep 2/ d" /etc/init.d/dnsmasq # SLOW
|
||||
# IPv6 support for nc openbsd better than traditional
|
||||
apt-get install -y --force-yes netcat-openbsd
|
||||
fi
|
||||
distro_check
|
||||
|
||||
# fix permission denied to resolvconf post-inst /etc/resolv.conf moby/moby issue #1297
|
||||
apt-get -y install debconf-utils && echo resolvconf resolvconf/linkify-resolvconf boolean false | debconf-set-selections
|
||||
|
||||
# Tried this - unattended causes starting services during a build, should probably PR a flag to shut that off and switch to that
|
||||
#bash -ex "./${PIHOLE_INSTALL}" --unattended
|
||||
install_dependent_packages INSTALLER_DEPS[@]
|
||||
install_dependent_packages PIHOLE_DEPS[@]
|
||||
install_dependent_packages PIHOLE_WEB_DEPS[@]
|
||||
# IPv6 support for nc openbsd better than traditional
|
||||
apt-get install -y --force-yes netcat-openbsd
|
||||
|
||||
piholeGitUrl="${piholeGitUrl}"
|
||||
webInterfaceGitUrl="${webInterfaceGitUrl}"
|
||||
|
@ -40,19 +58,18 @@ webInterfaceDir="${webInterfaceDir}"
|
|||
git clone "${piholeGitUrl}" "${PI_HOLE_LOCAL_REPO}"
|
||||
git clone "${webInterfaceGitUrl}" "${webInterfaceDir}"
|
||||
|
||||
export PIHOLE_INTERFACE=eth0
|
||||
export IPV4_ADDRESS=0.0.0.0
|
||||
export IPV6_ADDRESS=0:0:0:0:0:0
|
||||
export PIHOLE_DNS_1=8.8.8.8
|
||||
export PIHOLE_DNS_2=8.8.4.4
|
||||
export QUERY_LOGGING=true
|
||||
|
||||
tmpLog="/tmp/pihole-install.log"
|
||||
installLogLoc="${installLogLoc}"
|
||||
installPihole | tee "${tmpLog}"
|
||||
mv "${tmpLog}" /
|
||||
|
||||
if [[ $USE_DEVELOPMENT_BRANCHES == true ]] ; then
|
||||
if [[ $USE_FTLDNS_BRANCHES == true ]] ; then
|
||||
ln -s /bin/true /usr/local/bin/service
|
||||
echo "FTLDNS" | tee /etc/pihole/ftlbranch
|
||||
echo y | bash -x pihole checkout core FTLDNS
|
||||
echo y | bash -x pihole checkout web FTLDNS
|
||||
unlink /usr/local/bin/service
|
||||
elif [[ $USE_DEVELOPMENT_BRANCHES == true ]] ; then
|
||||
ln -s /bin/true /usr/local/bin/service
|
||||
echo y | bash -x pihole checkout core development
|
||||
echo y | bash -x pihole checkout web devel
|
||||
|
|
Loading…
Reference in New Issue