commit
f38ac6ff0b
|
@ -21,7 +21,8 @@ from docopt import docopt
|
|||
from jinja2 import Environment, FileSystemLoader
|
||||
from docopt import docopt
|
||||
import os
|
||||
import testinfra
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
@ -105,10 +106,6 @@ def build_dockerfiles(args):
|
|||
|
||||
|
||||
def build(docker_repo, arch, args):
|
||||
run_local = testinfra.get_backend(
|
||||
"local://"
|
||||
).get_module("Command").run
|
||||
|
||||
dockerfile = 'Dockerfile_{}'.format(arch)
|
||||
repo_tag = '{}:{}_{}'.format(docker_repo, __version__, arch)
|
||||
cached_image = '{}/{}'.format('pihole', repo_tag)
|
||||
|
@ -123,14 +120,15 @@ def build(docker_repo, arch, args):
|
|||
print(" ::: Building {} into {}".format(dockerfile, repo_tag))
|
||||
if args['-v']:
|
||||
print(build_command, '\n')
|
||||
build_result = run_local(build_command)
|
||||
build_result = subprocess.Popen(build_command.split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if args['-v']:
|
||||
print(build_result.stdout)
|
||||
print(build_result.stderr)
|
||||
if build_result.rc != 0:
|
||||
for c in iter(lambda: build_result.stdout.read(1), b''):
|
||||
sys.stdout.write(c)
|
||||
build_result.wait()
|
||||
if build_result.returncode != 0:
|
||||
print(" ::: Building {} encountered an error".format(dockerfile))
|
||||
print(build_result.stderr)
|
||||
assert build_result.rc == 0
|
||||
assert build_result.returncode == 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -35,11 +35,11 @@ ENV ServerIP 0.0.0.0
|
|||
ENV FTL_CMD no-daemon
|
||||
ENV DNSMASQ_USER root
|
||||
|
||||
ENV VERSION v4.3.1
|
||||
ENV VERSION v4.3.2
|
||||
ENV ARCH aarch64
|
||||
ENV PATH /opt/pihole:${PATH}
|
||||
|
||||
LABEL image="pihole/pihole:v4.3.1_aarch64"
|
||||
LABEL image="pihole/pihole:v4.3.2_aarch64"
|
||||
LABEL maintainer="adam@diginc.us"
|
||||
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ ENV ServerIP 0.0.0.0
|
|||
ENV FTL_CMD no-daemon
|
||||
ENV DNSMASQ_USER root
|
||||
|
||||
ENV VERSION v4.3.1
|
||||
ENV VERSION v4.3.2
|
||||
ENV ARCH amd64
|
||||
ENV PATH /opt/pihole:${PATH}
|
||||
|
||||
LABEL image="pihole/pihole:v4.3.1_amd64"
|
||||
LABEL image="pihole/pihole:v4.3.2_amd64"
|
||||
LABEL maintainer="adam@diginc.us"
|
||||
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ ENV ServerIP 0.0.0.0
|
|||
ENV FTL_CMD no-daemon
|
||||
ENV DNSMASQ_USER root
|
||||
|
||||
ENV VERSION v4.3.1
|
||||
ENV VERSION v4.3.2
|
||||
ENV ARCH armel
|
||||
ENV PATH /opt/pihole:${PATH}
|
||||
|
||||
LABEL image="pihole/pihole:v4.3.1_armel"
|
||||
LABEL image="pihole/pihole:v4.3.2_armel"
|
||||
LABEL maintainer="adam@diginc.us"
|
||||
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ ENV ServerIP 0.0.0.0
|
|||
ENV FTL_CMD no-daemon
|
||||
ENV DNSMASQ_USER root
|
||||
|
||||
ENV VERSION v4.3.1
|
||||
ENV VERSION v4.3.2
|
||||
ENV ARCH armhf
|
||||
ENV PATH /opt/pihole:${PATH}
|
||||
|
||||
LABEL image="pihole/pihole:v4.3.1_armhf"
|
||||
LABEL image="pihole/pihole:v4.3.2_armhf"
|
||||
LABEL maintainer="adam@diginc.us"
|
||||
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ version: "3"
|
|||
# https://github.com/pi-hole/docker-pi-hole/blob/master/README.md
|
||||
|
||||
services:
|
||||
applist:
|
||||
jwilder-proxy:
|
||||
image: jwilder/nginx-proxy
|
||||
ports:
|
||||
- '80:80'
|
||||
|
@ -27,8 +27,8 @@ services:
|
|||
volumes:
|
||||
- './etc-pihole/:/etc/pihole/'
|
||||
- './etc-dnsmasq.d/:/etc/dnsmasq.d/'
|
||||
# run `mkdir var-log; touch ./var-log/pihole.log` first unless you like errors
|
||||
- './var-log/pihole.log:/var/log/pihole.log'
|
||||
# run `touch ./var-log/pihole.log` first unless you like errors
|
||||
# - './var-log/pihole.log:/var/log/pihole.log'
|
||||
# Recommended but not required (DHCP needs NET_ADMIN)
|
||||
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
|
||||
cap_add:
|
||||
|
@ -48,16 +48,16 @@ services:
|
|||
- 'wordpress wordpress.yourDomain.lan:192.168.41.55'
|
||||
restart: always
|
||||
|
||||
# Another container you might want to have running through the proxy
|
||||
# Note it also have ENV Vars like pihole and a host under pihole's extra_hosts
|
||||
#ghost:
|
||||
# image: fractalf/ghost
|
||||
# ports:
|
||||
# - '2368:2368/tcp'
|
||||
# volumes:
|
||||
# - '/etc/ghost/:/ghost-override'
|
||||
# environment:
|
||||
# PROXY_LOCATION: ghost
|
||||
# VIRTUAL_HOST: ghost.yourDomain.lan
|
||||
# VIRTUAL_PORT: 2368
|
||||
# restart: always
|
||||
# Another container you might want to have running through the proxy
|
||||
# Note it also have ENV Vars like pihole and a host under pihole's extra_hosts
|
||||
# ghost:
|
||||
# image: fractalf/ghost
|
||||
# ports:
|
||||
# - '2368:2368/tcp'
|
||||
# volumes:
|
||||
# - '/etc/ghost/:/ghost-override'
|
||||
# environment:
|
||||
# PROXY_LOCATION: ghost
|
||||
# VIRTUAL_HOST: ghost.yourDomain.lan
|
||||
# VIRTUAL_PORT: 2368
|
||||
# restart: always
|
16
install.sh
16
install.sh
|
@ -47,19 +47,21 @@ distro_check
|
|||
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[@]
|
||||
ln -s /bin/true /usr/local/bin/service
|
||||
bash -ex "./${PIHOLE_INSTALL}" --unattended
|
||||
rm /usr/local/bin/service
|
||||
# Old way of setting up
|
||||
#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}"
|
||||
webInterfaceDir="${webInterfaceDir}"
|
||||
git clone --branch "${CORE_VERSION}" --depth 1 "${piholeGitUrl}" "${PI_HOLE_LOCAL_REPO}"
|
||||
git clone --branch "${WEB_VERSION}" --depth 1 "${webInterfaceGitUrl}" "${webInterfaceDir}"
|
||||
#git clone --branch "${CORE_VERSION}" --depth 1 "${piholeGitUrl}" "${PI_HOLE_LOCAL_REPO}"
|
||||
#git clone --branch "${WEB_VERSION}" --depth 1 "${webInterfaceGitUrl}" "${webInterfaceDir}"
|
||||
|
||||
tmpLog="/tmp/pihole-install.log"
|
||||
installLogLoc="${installLogLoc}"
|
||||
|
|
Loading…
Reference in New Issue