diff --git a/Dockerfile.py b/Dockerfile.py index 0aa1e1b..0db8d92 100755 --- a/Dockerfile.py +++ b/Dockerfile.py @@ -112,8 +112,9 @@ def run_and_stream_command_output(command, args): print(line, end='') build_result.wait() if build_result.returncode != 0: - print(" ::: Error running".format(command)) + print(" ::: Error running {}".format(command)) print(build_result.stderr) + sys.exit(build_resuilt.returncode) def build(docker_repo, arch, args): diff --git a/Dockerfile.sh b/Dockerfile.sh index e48a64f..1446b0f 100755 --- a/Dockerfile.sh +++ b/Dockerfile.sh @@ -1,8 +1,9 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash + # alpine sh only set -eux -./Dockerfile.py -v --arch="${ARCH}" --hub_tag="${ARCH_IMAGE}" +./Dockerfile.py -v --no-cache --arch="${ARCH}" --hub_tag="${ARCH_IMAGE}" # TODO: Add junitxml output and have circleci consume it # 2 parallel max b/c race condition with docker fixture (I think?) py.test -vv -n 2 -k "${ARCH}" ./test/ diff --git a/Dockerfile_amd64 b/Dockerfile_amd64 index 121adde..f2f1532 100644 --- a/Dockerfile_amd64 +++ b/Dockerfile_amd64 @@ -37,10 +37,10 @@ ENV ServerIP 0.0.0.0 ENV FTL_CMD no-daemon ENV DNSMASQ_USER root -ENV VERSION v5.0 +ENV VERSION v5.1.1 ENV PATH /opt/pihole:${PATH} -LABEL image="pihole/pihole:v5.0_amd64" +LABEL image="pihole/pihole:v5.1.1_amd64" LABEL maintainer="adam@diginc.us" LABEL url="https://www.github.com/pi-hole/docker-pi-hole" diff --git a/Dockerfile_arm64 b/Dockerfile_arm64 index c3f6ad4..dd7a66c 100644 --- a/Dockerfile_arm64 +++ b/Dockerfile_arm64 @@ -37,10 +37,10 @@ ENV ServerIP 0.0.0.0 ENV FTL_CMD no-daemon ENV DNSMASQ_USER root -ENV VERSION v5.0 +ENV VERSION v5.1.1 ENV PATH /opt/pihole:${PATH} -LABEL image="pihole/pihole:v5.0_arm64" +LABEL image="pihole/pihole:v5.1.1_arm64" LABEL maintainer="adam@diginc.us" LABEL url="https://www.github.com/pi-hole/docker-pi-hole" diff --git a/Dockerfile_armel b/Dockerfile_armel index dc35b3a..687f964 100644 --- a/Dockerfile_armel +++ b/Dockerfile_armel @@ -37,10 +37,10 @@ ENV ServerIP 0.0.0.0 ENV FTL_CMD no-daemon ENV DNSMASQ_USER root -ENV VERSION v5.0 +ENV VERSION v5.1.1 ENV PATH /opt/pihole:${PATH} -LABEL image="pihole/pihole:v5.0_armel" +LABEL image="pihole/pihole:v5.1.1_armel" LABEL maintainer="adam@diginc.us" LABEL url="https://www.github.com/pi-hole/docker-pi-hole" diff --git a/Dockerfile_armhf b/Dockerfile_armhf index 1862462..e626156 100644 --- a/Dockerfile_armhf +++ b/Dockerfile_armhf @@ -37,10 +37,10 @@ ENV ServerIP 0.0.0.0 ENV FTL_CMD no-daemon ENV DNSMASQ_USER root -ENV VERSION v5.0 +ENV VERSION v5.1.1 ENV PATH /opt/pihole:${PATH} -LABEL image="pihole/pihole:v5.0_armhf" +LABEL image="pihole/pihole:v5.1.1_armhf" LABEL maintainer="adam@diginc.us" LABEL url="https://www.github.com/pi-hole/docker-pi-hole" diff --git a/Dockerfile_build b/Dockerfile_build index 550a050..fdf3c4c 100644 --- a/Dockerfile_build +++ b/Dockerfile_build @@ -1,10 +1,13 @@ -FROM docker:latest +FROM python:buster + +# Only works for docker CLIENT (bind mounted socket) +COPY --from=docker:18.09.3 /usr/local/bin/docker /usr/local/bin/ # Based on https://github.com/Ilhicas/alpine-pipenv ARG packages -RUN apk --update add python3 python3-dev curl gcc make \ - musl-dev libffi-dev openssl-dev ${packages} \ - && rm -rf /var/cache/apk/* \ +RUN apt-get update && \ + apt-get install -y python3-dev curl gcc make \ + libffi-dev libssl-dev ${packages} \ && pip3 install -U pip pipenv @@ -14,7 +17,7 @@ COPY Pipfile* /root/ WORKDIR /root RUN pipenv install --system \ - && sed -i 's|/bin/sh|/bin/bash|g' /usr/lib/python3.8/site-packages/testinfra/backend/docker.py + && sed -i 's|/bin/sh|/bin/bash|g' /usr/local/lib/python3.8/site-packages/testinfra/backend/docker.py RUN echo "set -ex && Dockerfile.sh && \$@" > /usr/local/bin/entrypoint.sh diff --git a/VERSION b/VERSION index 5e0a0f1..346d9ca 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v5.0 +v5.1.1 diff --git a/circle-test.sh b/circle-test.sh index e0a8b93..f3ce7fe 100755 --- a/circle-test.sh +++ b/circle-test.sh @@ -12,6 +12,7 @@ if [[ "$1" == "enter" ]]; then fi # generate and build dockerfile +docker pull python:buster docker build -t image_pipenv -f Dockerfile_build . env > /tmp/env docker run --rm \ diff --git a/install.sh b/install.sh index 2df2275..3de2723 100644 --- a/install.sh +++ b/install.sh @@ -4,7 +4,7 @@ mkdir -p /etc/pihole/ mkdir -p /var/run/pihole # Production tags with valid web footers export CORE_VERSION="$(cat /etc/docker-pi-hole-version)" -export WEB_VERSION="${CORE_VERSION}" +export WEB_VERSION="v5.1" # Only use for pre-production / testing export CHECKOUT_BRANCHES=false @@ -15,6 +15,7 @@ fi apt-get update apt-get install --no-install-recommends -y curl procps ca-certificates +ln -s `which echo` /usr/local/bin/whiptail curl -L -s $S6OVERLAY_RELEASE | tar xvzf - -C / mv /init /s6-init