Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v4.0 #300

Merged
merged 48 commits into from
Aug 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
3bf7992
Merge branch 'master' of github.com:diginc/docker-pi-hole into dev
diginc Jun 30, 2018
60bd77f
Add in install option for FTLDNS
diginc Jun 30, 2018
d45bccf
remove dnsmasq service for new pihole-FTL service
diginc Jul 3, 2018
041ef30
Merge remote-tracking branch 'origin/dev' into prerelease
diginc Jul 3, 2018
ad6b4be
Fixes to the startup, services, and dnsmasq references
diginc Jul 3, 2018
3877a17
fix startup 53 port conflict and test error
diginc Jul 4, 2018
70acf54
Merge branch 'dev' of github.com:diginc/docker-pi-hole into prerelease
diginc Jul 11, 2018
e14b742
Merge branch 'dev' of github.com:diginc/docker-pi-hole into prerelease
diginc Jul 12, 2018
bb3885a
Update the deploy arm to work...better
diginc Jul 12, 2018
e56b5ed
small tweak to deploy_arm
diginc Jul 12, 2018
478b98c
Merge branch 'dev' of github.com:diginc/docker-pi-hole into prerelease
diginc Jul 18, 2018
520669a
merge in dev/master armel goodies
diginc Jul 20, 2018
0e7ab46
add finish scripts to restart cleanly
diginc Jul 20, 2018
468470b
Added setup_blocklists, other cleanup
diginc Jul 29, 2018
c7d775a
switch branch to release/v4.0
diginc Jul 31, 2018
e7f5433
Checkout to the new release branch not old FTLDNS one
diginc Aug 2, 2018
e7ae12a
Add fixes for config permissions, deprection notice
diginc Aug 3, 2018
ae16d39
note about armel
diginc Aug 4, 2018
187c1d3
stop using pihole init.d stop, may be going away
diginc Aug 4, 2018
73f05e6
A bunch of name changes
diginc Aug 4, 2018
805c5cc
more /diginc/ references updated
diginc Aug 4, 2018
5b1e992
missed one file
diginc Aug 4, 2018
6e15abd
more readme old debian tags
diginc Aug 4, 2018
80d5b9d
Test image name updates, passing locally. reorg Dockerfile to build …
diginc Aug 4, 2018
65ecba6
updated script for new names
diginc Aug 4, 2018
a429641
readme updates
diginc Aug 4, 2018
1f49971
multiarch reference removed
diginc Aug 4, 2018
7b06920
travis link fix
diginc Aug 4, 2018
a257be1
Typo, "Pi-hole" consistantly
diginc Aug 4, 2018
c8d7abe
image, theirs=ours, dockers=docker containers
diginc Aug 4, 2018
3c13577
image to html the same as main repo's
diginc Aug 4, 2018
df63b3e
image to top, links fix, better writing for 443 sinkhole
diginc Aug 4, 2018
1c063a6
change password interactively to avoid leaving bash history
diginc Aug 4, 2018
5ee2cc9
Better writing for second half of 443 sinkhold section
diginc Aug 4, 2018
4dc3c7e
Merge pull request #302 from pi-hole/repo_naming_changes
diginc Aug 4, 2018
119999b
Fix web password corruption
diginc Aug 4, 2018
20e8ce2
quick fix to web password regression, probably not greatest fix but i…
diginc Aug 4, 2018
5cc28d7
Updated deploy script (still needs work), fixed dead link
diginc Aug 5, 2018
c56385a
remove multiarch and comments from readme (dockerhub does not high co…
diginc Aug 5, 2018
797a921
Adding helpful comment for copy paste to Dockerhub/Store
diginc Aug 5, 2018
b7e813c
Merge branch 'master' of github.com:diginc/docker-pi-hole into releas…
diginc Aug 5, 2018
7cbb8d1
Merge branch 'master' into release/v4.0
diginc Aug 5, 2018
22ea5e7
Use new v4 prod tags, scrub old dev install code
diginc Aug 5, 2018
b5c7ab0
Merge branch 'release/v4.0' of github.com:diginc/docker-pi-hole into …
diginc Aug 5, 2018
cb0fffa
disable armel(broken in 4.0 for now)
diginc Aug 5, 2018
999f02b
start of fixing race condition by not having test+s6 both run /start.sh
diginc Aug 5, 2018
65a1ac7
grab version on startup for web footer. 2 tests stablized
diginc Aug 5, 2018
f8d3769
Fix regex writing for web, fix deploying latest
diginc Aug 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ env:
- QEMU_VER=v2.9.1
matrix:
- ARCH=amd64
- ARCH=armel
- ARCH=armhf
- ARCH=aarch64
python:
Expand All @@ -21,4 +20,5 @@ script:
- ./Dockerfile.py --arch=${ARCH} -v
- docker images
# run docker build & tests
- py.test -vv -n auto -k "${ARCH}" ./test/
# 2 parallel max b/c race condition with docker fixture (I think?)
- py.test -vv -n 2 -k "${ARCH}" ./test/
36 changes: 16 additions & 20 deletions Dockerfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,18 @@
THIS_DIR = os.path.dirname(os.path.abspath(__file__))

base_vars = {
'name': 'diginc/pi-hole',
'name': 'pihole/pihole',
'maintainer' : 'adam@diginc.us',
's6_version' : 'v1.21.4.0',
}

os_base_vars = {
'debian': {
'php_env_config': '/etc/lighttpd/conf-enabled/15-fastcgi-php.conf',
'php_error_log': '/var/log/lighttpd/error.log'
},
'php_env_config': '/etc/lighttpd/conf-enabled/15-fastcgi-php.conf',
'php_error_log': '/var/log/lighttpd/error.log'
}

images = {
'debian': [
'v4.0': [
{
'base': 'debian:stretch',
'arch': 'amd64'
Expand All @@ -63,25 +61,25 @@ def generate_dockerfiles(args):
print " ::: Skipping Dockerfile generation"
return

for os, archs in images.iteritems():
for version, archs in images.iteritems():
for image in archs:
if image['arch'] not in args['--arch'] or image['arch'] in args['--skip']:
return
s6arch = image['arch']
if image['arch'] == 'armel':
s6arch = 'arm'
merged_data = dict(
{ 'os': os }.items() +
{ 'version': version }.items() +
base_vars.items() +
os_base_vars[os].items() +
os_base_vars.items() +
image.items() +
{ 's6arch': s6arch }.items()
)
j2_env = Environment(loader=FileSystemLoader(THIS_DIR),
trim_blocks=True)
template = j2_env.get_template('Dockerfile.template')

dockerfile = 'Dockerfile_{}_{}'.format(os, image['arch'])
dockerfile = 'Dockerfile_{}'.format(image['arch'])
with open(dockerfile, 'w') as f:
f.write(template.render(pihole=merged_data))

Expand All @@ -92,21 +90,18 @@ def build_dockerfiles(args):
return

for arch in args['--arch']:
docker_repo = 'pi-hole-multiarch'
if arch == 'amd64':
docker_repo = 'pi-hole'
# TODO: include from external .py that can be shared with Dockerfile.py / Tests / deploy scripts '''
build('pihole', 'v4.0', arch, args)

build(docker_repo, 'debian', arch, args)


def build(docker_repo, os, arch, args):
def build(docker_repo, version, arch, args):
run_local = testinfra.get_backend(
"local://"
).get_module("Command").run

dockerfile = 'Dockerfile_{}_{}'.format(os, arch)
repo_tag = '{}:{}_{}'.format(docker_repo, os, arch)
cached_image = '{}/{}'.format('diginc', repo_tag)
dockerfile = 'Dockerfile_{}'.format(arch)
repo_tag = '{}:{}_{}'.format(docker_repo, version, arch)
cached_image = '{}/{}'.format('pihole', repo_tag)
no_cache = ''
if args['--no-cache']:
no_cache = '--no-cache'
Expand All @@ -118,14 +113,15 @@ 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
assert build_result.rc == 0


if __name__ == '__main__':
args = docopt(__doc__, version='Dockerfile 0.2')
args = docopt(__doc__, version='Dockerfile 1.0')
# print args

generate_dockerfiles(args)
Expand Down
29 changes: 14 additions & 15 deletions Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
FROM {{ pihole.base }}

LABEL image="{{ pihole.name }}:{{ pihole.os }}_{{ pihole.arch }}"
LABEL maintainer="{{ pihole.maintainer }}"
LABEL url="https://www.github.com/diginc/docker-pi-hole"

ENV TAG {{ pihole.os }}
ENV ARCH {{ pihole.arch }}
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 PIHOLE_INSTALL /root/ph_install.sh
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/{{ pihole.s6_version }}/s6-overlay-{{ pihole.s6arch }}.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 procps && \
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 /
ADD s6/debian-root /
COPY s6/service /usr/local/bin/service

# php config start passes special ENVs into
Expand All @@ -45,6 +36,14 @@ ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
ENV FTL_CMD no-daemon

ENV VERSION {{ pihole.version }}
ENV ARCH {{ pihole.arch }}
ENV PATH /opt/pihole:${PATH}

LABEL image="{{ pihole.name }}:{{ pihole.version }}_{{ pihole.arch }}"
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

SHELL ["/bin/bash", "-c"]
27 changes: 13 additions & 14 deletions Dockerfile_debian_aarch64 → Dockerfile_aarch64
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
FROM multiarch/debian-debootstrap:arm64-stretch-slim

LABEL image="diginc/pi-hole:debian_aarch64"
LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/diginc/docker-pi-hole"

ENV TAG debian
ENV ARCH aarch64
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 PIHOLE_INSTALL /root/ph_install.sh
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 procps && \
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 /
Expand All @@ -45,6 +36,14 @@ ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
ENV FTL_CMD no-daemon

ENV VERSION v4.0
ENV ARCH aarch64
ENV PATH /opt/pihole:${PATH}

LABEL image="pihole/pihole:v4.0_aarch64"
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

SHELL ["/bin/bash", "-c"]
27 changes: 13 additions & 14 deletions Dockerfile_debian_amd64 → Dockerfile_amd64
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
FROM debian:stretch

LABEL image="diginc/pi-hole:debian_amd64"
LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/diginc/docker-pi-hole"

ENV TAG debian
ENV ARCH amd64
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 PIHOLE_INSTALL /root/ph_install.sh
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 procps && \
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 /
Expand All @@ -45,6 +36,14 @@ ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
ENV FTL_CMD no-daemon

ENV VERSION v4.0
ENV ARCH amd64
ENV PATH /opt/pihole:${PATH}

LABEL image="pihole/pihole:v4.0_amd64"
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

SHELL ["/bin/bash", "-c"]
27 changes: 13 additions & 14 deletions Dockerfile_debian_armel → Dockerfile_armel
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
FROM multiarch/debian-debootstrap:armel-stretch-slim

LABEL image="diginc/pi-hole:debian_armel"
LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/diginc/docker-pi-hole"

ENV TAG debian
ENV ARCH armel
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 PIHOLE_INSTALL /root/ph_install.sh
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.4.0/s6-overlay-arm.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 procps && \
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 /
Expand All @@ -45,6 +36,14 @@ ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
ENV FTL_CMD no-daemon

ENV VERSION v4.0
ENV ARCH armel
ENV PATH /opt/pihole:${PATH}

LABEL image="pihole/pihole:v4.0_armel"
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

SHELL ["/bin/bash", "-c"]
27 changes: 13 additions & 14 deletions Dockerfile_debian_armhf → Dockerfile_armhf
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
FROM multiarch/debian-debootstrap:armhf-stretch-slim

LABEL image="diginc/pi-hole:debian_armhf"
LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/diginc/docker-pi-hole"

ENV TAG debian
ENV ARCH armhf
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 PIHOLE_INSTALL /root/ph_install.sh
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 procps && \
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 /
Expand All @@ -45,6 +36,14 @@ ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
ENV FTL_CMD no-daemon

ENV VERSION v4.0
ENV ARCH armhf
ENV PATH /opt/pihole:${PATH}

LABEL image="pihole/pihole:v4.0_armhf"
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

SHELL ["/bin/bash", "-c"]
Loading