Merge branch 'dev'
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
commit
1b6318c0d9
|
@ -1,19 +1,14 @@
|
||||||
232623name: Build & Deploy Nightly images
|
name: Build & Deploy Nightly images
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 2 * * *'
|
- cron: '0 2 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-and-build:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
ARCH: [amd64, armhf, arm64, i386]
|
|
||||||
DEBIAN_VERSION: [buster]
|
|
||||||
env:
|
env:
|
||||||
ARCH: ${{matrix.ARCH}}
|
ARCH: amd64
|
||||||
DEBIAN_VERSION: ${{matrix.DEBIAN_VERSION}}
|
DEBIAN_VERSION: buster
|
||||||
CORE_VERSION: development
|
CORE_VERSION: development
|
||||||
WEB_VERSION: devel
|
WEB_VERSION: devel
|
||||||
FTL_VERSION: development
|
FTL_VERSION: development
|
||||||
|
@ -22,45 +17,46 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: dev
|
ref: dev
|
||||||
- name: Checkout Dummy Branch to set image name
|
|
||||||
run: |
|
|
||||||
git checkout -b nightly
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
echo "Building ${ARCH}-${DEBIAN_VERSION}"
|
echo "Building ${ARCH}-${DEBIAN_VERSION}"
|
||||||
./gh-actions-test.sh
|
./gh-actions-test.sh
|
||||||
- name: Push the ARCH image
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
run: |
|
|
||||||
. gh-actions-vars.sh
|
|
||||||
echo "${{ secrets.DOCKERHUB_PASS }}" | docker login --username="${{ secrets.DOCKERHUB_USER }}" --password-stdin
|
|
||||||
docker push "${ARCH_IMAGE}"
|
|
||||||
- name: Upload gh-workspace
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: gh-workspace
|
|
||||||
path: .gh-workspace
|
|
||||||
|
|
||||||
publish:
|
build-and-publish:
|
||||||
runs-on: ubuntu-latest
|
if: github.event_name != 'pull_request'
|
||||||
needs: test-and-build
|
needs: test
|
||||||
steps:
|
runs-on: ubuntu-latest
|
||||||
- name: Checkout Repo
|
steps:
|
||||||
uses: actions/checkout@v2
|
-
|
||||||
with:
|
name: Checkout
|
||||||
ref: dev
|
uses: actions/checkout@v2
|
||||||
- name: Checkout Dummy Branch to set image name
|
-
|
||||||
run: |
|
name: Get the tag name
|
||||||
git checkout -b nightly
|
run: |
|
||||||
- name: Download workspace files
|
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
uses: actions/download-artifact@v1
|
-
|
||||||
with:
|
name: Set up QEMU
|
||||||
name: gh-workspace
|
uses: docker/setup-qemu-action@v1
|
||||||
path: .gh-workspace
|
-
|
||||||
- name: Tag and Publish multi-arch images
|
name: Set up Docker Buildx
|
||||||
env:
|
uses: docker/setup-buildx-action@v1
|
||||||
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
|
-
|
||||||
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
|
name: Login to DockerHub
|
||||||
run: |
|
uses: docker/login-action@v1
|
||||||
./gh-actions-deploy.sh
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USER }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_PASS }}
|
||||||
|
-
|
||||||
|
name: Build and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64, linux/arm64, linux/386, linux/arm/v7, linux/arm/v6, linux/ppc64le
|
||||||
|
build-args: |
|
||||||
|
CORE_VERSION=development
|
||||||
|
WEB_VERSION=devel
|
||||||
|
FTL_VERSION=development
|
||||||
|
PIHOLE_VERSION=nightly
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
pihole/pihole:nightly
|
|
@ -7,20 +7,12 @@ on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
#env:
|
|
||||||
# DOCKER_HUB_REPO: pihole
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-and-build:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
ARCH: [amd64, armhf, arm64, i386]
|
|
||||||
DEBIAN_VERSION: [buster]
|
|
||||||
env:
|
env:
|
||||||
ARCH: ${{matrix.ARCH}}
|
ARCH: amd64
|
||||||
DEBIAN_VERSION: ${{matrix.DEBIAN_VERSION}}
|
DEBIAN_VERSION: buster
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -28,34 +20,46 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo "Building ${ARCH}-${DEBIAN_VERSION}"
|
echo "Building ${ARCH}-${DEBIAN_VERSION}"
|
||||||
./gh-actions-test.sh
|
./gh-actions-test.sh
|
||||||
- name: Push the ARCH image
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
run: |
|
|
||||||
. gh-actions-vars.sh
|
|
||||||
echo "${{ secrets.DOCKERHUB_PASS }}" | docker login --username="${{ secrets.DOCKERHUB_USER }}" --password-stdin
|
|
||||||
docker push "${ARCH_IMAGE}"
|
|
||||||
- name: Upload gh-workspace
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: gh-workspace
|
|
||||||
path: .gh-workspace
|
|
||||||
|
|
||||||
publish:
|
build-and-publish:
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
|
needs: test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test-and-build
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
-
|
||||||
|
name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Download workspace files
|
-
|
||||||
uses: actions/download-artifact@v1
|
name: Get the tag name
|
||||||
with:
|
|
||||||
name: gh-workspace
|
|
||||||
path: .gh-workspace
|
|
||||||
- name: Tag and Publish multi-arch images
|
|
||||||
env:
|
|
||||||
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
|
|
||||||
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
|
|
||||||
run: |
|
run: |
|
||||||
./gh-actions-deploy.sh
|
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
-
|
||||||
|
name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v3
|
||||||
|
with:
|
||||||
|
images: pihole/pihole
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
-
|
||||||
|
name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USER }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_PASS }}
|
||||||
|
-
|
||||||
|
name: Build and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64, linux/arm64, linux/386, linux/arm/v7, linux/arm/v6, linux/ppc64le
|
||||||
|
build-args: |
|
||||||
|
PIHOLE_VERSION=${{ env.TAG }}
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
|
@ -11,25 +11,20 @@ on:
|
||||||
required: true
|
required: true
|
||||||
core:
|
core:
|
||||||
description: 'Branch or tag of core repo'
|
description: 'Branch or tag of core repo'
|
||||||
required: true
|
required: false
|
||||||
web:
|
web:
|
||||||
description: 'Branch or tag of web repo'
|
description: 'Branch or tag of web repo'
|
||||||
required: true
|
required: false
|
||||||
ftl:
|
ftl:
|
||||||
description: 'Branch or tag of ftl repo'
|
description: 'Branch or tag of ftl repo'
|
||||||
required: true
|
required: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-and-build:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
ARCH: [amd64, armhf, arm64, i386]
|
|
||||||
DEBIAN_VERSION: [buster]
|
|
||||||
env:
|
env:
|
||||||
ARCH: ${{matrix.ARCH}}
|
ARCH: amd64
|
||||||
DEBIAN_VERSION: ${{matrix.DEBIAN_VERSION}}
|
DEBIAN_VERSION: buster
|
||||||
CORE_VERSION: ${{ github.event.inputs.core }}
|
CORE_VERSION: ${{ github.event.inputs.core }}
|
||||||
WEB_VERSION: ${{ github.event.inputs.web }}
|
WEB_VERSION: ${{ github.event.inputs.web }}
|
||||||
FTL_VERSION: ${{ github.event.inputs.ftl }}
|
FTL_VERSION: ${{ github.event.inputs.ftl }}
|
||||||
|
@ -38,45 +33,41 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.inputs.branch }}
|
ref: ${{ github.event.inputs.branch }}
|
||||||
- name: Checkout Dummy Branch to set image name
|
|
||||||
run: |
|
|
||||||
git checkout -b ${{ github.event.inputs.name }}
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
echo "Building ${ARCH}-${DEBIAN_VERSION}"
|
echo "Building ${ARCH}-${DEBIAN_VERSION}"
|
||||||
./gh-actions-test.sh
|
./gh-actions-test.sh
|
||||||
# - name: Push the ARCH image
|
|
||||||
# if: github.event_name != 'pull_request'
|
|
||||||
# run: |
|
|
||||||
# . gh-actions-vars.sh
|
|
||||||
# echo "${{ secrets.DOCKERHUB_PASS }}" | docker login --username="${{ secrets.DOCKERHUB_USER }}" --password-stdin
|
|
||||||
# docker push "${ARCH_IMAGE}"
|
|
||||||
- name: Upload gh-workspace
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: gh-workspace
|
|
||||||
path: .gh-workspace
|
|
||||||
|
|
||||||
publish:
|
build-and-publish:
|
||||||
|
needs: test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test-and-build
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
-
|
||||||
|
name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
-
|
||||||
|
name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
ref: dev
|
username: ${{ secrets.DOCKERHUB_USER }}
|
||||||
- name: Checkout Dummy Branch to set image name
|
password: ${{ secrets.DOCKERHUB_PASS }}
|
||||||
run: |
|
-
|
||||||
git checkout -b ${{ github.event.inputs.name }}
|
name: Build and push
|
||||||
- name: Download workspace files
|
uses: docker/build-push-action@v2
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
with:
|
||||||
name: gh-workspace
|
context: .
|
||||||
path: .gh-workspace
|
platforms: linux/amd64, linux/arm64, linux/386, linux/arm/v7, linux/arm/v6, linux/ppc64le
|
||||||
- name: Tag and Publish multi-arch images
|
build-args: |
|
||||||
env:
|
CORE_VERSION=${{ github.event.inputs.core }}
|
||||||
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
|
WEB_VERSION=${{ github.event.inputs.web }}
|
||||||
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
|
FTL_VERSION=${{ github.event.inputs.ftl }}
|
||||||
run: |
|
PIHOLE_VERSION=${{ github.event.inputs.name }}
|
||||||
./gh-actions-deploy.sh
|
push: true
|
||||||
|
tags: |
|
||||||
|
pihole/pihole:${{ github.event.inputs.name }}
|
||||||
|
|
27
Dockerfile
27
Dockerfile
|
@ -1,19 +1,16 @@
|
||||||
ARG PIHOLE_BASE
|
ARG PIHOLE_BASE
|
||||||
FROM $PIHOLE_BASE
|
FROM "${PIHOLE_BASE:-debian:buster-slim}"
|
||||||
|
|
||||||
ARG PIHOLE_ARCH
|
|
||||||
ENV PIHOLE_ARCH "${PIHOLE_ARCH}"
|
|
||||||
ARG PIHOLE_TAG
|
|
||||||
ENV PIHOLE_TAG "${PIHOLE_TAG}"
|
|
||||||
ARG CORE_VERSION
|
ARG CORE_VERSION
|
||||||
ENV CORE_VERSION "${CORE_VERSION}"
|
ENV CORE_VERSION "${CORE_VERSION}"
|
||||||
ARG WEB_VERSION
|
ARG WEB_VERSION
|
||||||
ENV WEB_VERSION "${WEB_VERSION}"
|
ENV WEB_VERSION "${WEB_VERSION}"
|
||||||
ARG FTL_VERSION
|
ARG FTL_VERSION
|
||||||
ENV FTL_VERSION "${FTL_VERSION}"
|
ENV FTL_VERSION "${FTL_VERSION}"
|
||||||
ARG S6_ARCH
|
ARG PIHOLE_VERSION
|
||||||
ARG S6_VERSION
|
ENV PIHOLE_VERSION "${PIHOLE_VERSION}"
|
||||||
ENV S6OVERLAY_RELEASE "https://github.com/just-containers/s6-overlay/releases/download/${S6_VERSION}/s6-overlay-${S6_ARCH}.tar.gz"
|
|
||||||
|
ENV S6_OVERLAY_VERSION v2.1.0.2
|
||||||
|
|
||||||
COPY install.sh /usr/local/bin/install.sh
|
COPY install.sh /usr/local/bin/install.sh
|
||||||
ENV PIHOLE_INSTALL /etc/.pihole/automated\ install/basic-install.sh
|
ENV PIHOLE_INSTALL /etc/.pihole/automated\ install/basic-install.sh
|
||||||
|
@ -28,9 +25,9 @@ COPY s6/service /usr/local/bin/service
|
||||||
|
|
||||||
# php config start passes special ENVs into
|
# php config start passes special ENVs into
|
||||||
ARG PHP_ENV_CONFIG
|
ARG PHP_ENV_CONFIG
|
||||||
ENV PHP_ENV_CONFIG "${PHP_ENV_CONFIG}"
|
ENV PHP_ENV_CONFIG /etc/lighttpd/conf-enabled/15-fastcgi-php.conf
|
||||||
ARG PHP_ERROR_LOG
|
ARG PHP_ERROR_LOG
|
||||||
ENV PHP_ERROR_LOG "${PHP_ERROR_LOG}"
|
ENV PHP_ERROR_LOG /var/log/lighttpd/error.log
|
||||||
COPY ./start.sh /
|
COPY ./start.sh /
|
||||||
COPY ./bash_functions.sh /
|
COPY ./bash_functions.sh /
|
||||||
|
|
||||||
|
@ -49,16 +46,8 @@ ENV ServerIP 0.0.0.0
|
||||||
ENV FTL_CMD no-daemon
|
ENV FTL_CMD no-daemon
|
||||||
ENV DNSMASQ_USER root
|
ENV DNSMASQ_USER root
|
||||||
|
|
||||||
ARG PIHOLE_VERSION
|
|
||||||
ENV VERSION "${PIHOLE_VERSION}"
|
|
||||||
ENV PATH /opt/pihole:${PATH}
|
ENV PATH /opt/pihole:${PATH}
|
||||||
|
|
||||||
ARG NAME
|
|
||||||
LABEL image="${NAME}:${PIHOLE_VERSION}_${PIHOLE_ARCH}"
|
|
||||||
ARG MAINTAINER
|
|
||||||
LABEL maintainer="${MAINTAINER}"
|
|
||||||
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"
|
|
||||||
|
|
||||||
HEALTHCHECK CMD dig +short +norecurse +retry=0 @127.0.0.1 pi.hole || exit 1
|
HEALTHCHECK CMD dig +short +norecurse +retry=0 @127.0.0.1 pi.hole || exit 1
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
|
@ -63,7 +63,6 @@ def build(docker_repo: str, arch: str, debian_version: str, hub_tag: str, show_t
|
||||||
build_env = os.environ.copy()
|
build_env = os.environ.copy()
|
||||||
build_env['PIHOLE_VERSION'] = os.environ.get('GIT_TAG', None)
|
build_env['PIHOLE_VERSION'] = os.environ.get('GIT_TAG', None)
|
||||||
build_env['DEBIAN_VERSION'] = debian_version
|
build_env['DEBIAN_VERSION'] = debian_version
|
||||||
build_env['PIHOLE_TAG'] = tag_name
|
|
||||||
build_command = f'{time_arg} docker-compose -f build.yml build {cache_arg} --pull {arch}'
|
build_command = f'{time_arg} docker-compose -f build.yml build {cache_arg} --pull {arch}'
|
||||||
print(f' ::: Building {arch} into {create_tag}')
|
print(f' ::: Building {arch} into {create_tag}')
|
||||||
success = run_and_stream_command_output(build_command, build_env, verbose)
|
success = run_and_stream_command_output(build_command, build_env, verbose)
|
||||||
|
|
19
build.yml
19
build.yml
|
@ -3,16 +3,9 @@ version: "3.7"
|
||||||
|
|
||||||
x-common-args: &common-args
|
x-common-args: &common-args
|
||||||
PIHOLE_VERSION: ${PIHOLE_VERSION}
|
PIHOLE_VERSION: ${PIHOLE_VERSION}
|
||||||
PIHOLE_TAG: ${PIHOLE_TAG}
|
|
||||||
CORE_VERSION: ${CORE_VERSION}
|
CORE_VERSION: ${CORE_VERSION}
|
||||||
WEB_VERSION: ${WEB_VERSION}
|
WEB_VERSION: ${WEB_VERSION}
|
||||||
FTL_VERSION: ${FTL_VERSION}
|
FTL_VERSION: ${FTL_VERSION}
|
||||||
NAME: pihole/pihole
|
|
||||||
MAINTAINER: adam@diginc.us
|
|
||||||
S6_VERSION: v2.1.0.2
|
|
||||||
PHP_ENV_CONFIG: /etc/lighttpd/conf-enabled/15-fastcgi-php.conf
|
|
||||||
PHP_ERROR_LOG: /var/log/lighttpd/error.log
|
|
||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
amd64:
|
amd64:
|
||||||
|
@ -22,8 +15,6 @@ services:
|
||||||
args:
|
args:
|
||||||
<<: *common-args
|
<<: *common-args
|
||||||
PIHOLE_BASE: pihole/debian-base:${DEBIAN_VERSION:-buster}
|
PIHOLE_BASE: pihole/debian-base:${DEBIAN_VERSION:-buster}
|
||||||
PIHOLE_ARCH: amd64
|
|
||||||
S6_ARCH: amd64
|
|
||||||
armel:
|
armel:
|
||||||
image: pihole:${PIHOLE_VERSION}-armel-${DEBIAN_VERSION:-buster}
|
image: pihole:${PIHOLE_VERSION}-armel-${DEBIAN_VERSION:-buster}
|
||||||
build:
|
build:
|
||||||
|
@ -31,8 +22,6 @@ services:
|
||||||
args:
|
args:
|
||||||
<<: *common-args
|
<<: *common-args
|
||||||
PIHOLE_BASE: pihole/debian-debootstrap:armel-${DEBIAN_VERSION:-buster}-slim
|
PIHOLE_BASE: pihole/debian-debootstrap:armel-${DEBIAN_VERSION:-buster}-slim
|
||||||
PIHOLE_ARCH: armel
|
|
||||||
S6_ARCH: arm
|
|
||||||
armhf:
|
armhf:
|
||||||
image: pihole:${PIHOLE_VERSION}-armhf-${DEBIAN_VERSION:-buster}
|
image: pihole:${PIHOLE_VERSION}-armhf-${DEBIAN_VERSION:-buster}
|
||||||
build:
|
build:
|
||||||
|
@ -40,8 +29,6 @@ services:
|
||||||
args:
|
args:
|
||||||
<<: *common-args
|
<<: *common-args
|
||||||
PIHOLE_BASE: pihole/debian-debootstrap:armhf-${DEBIAN_VERSION:-buster}-slim
|
PIHOLE_BASE: pihole/debian-debootstrap:armhf-${DEBIAN_VERSION:-buster}-slim
|
||||||
PIHOLE_ARCH: arm
|
|
||||||
S6_ARCH: arm
|
|
||||||
arm64:
|
arm64:
|
||||||
image: pihole:${PIHOLE_VERSION}-arm64-${DEBIAN_VERSION:-buster}
|
image: pihole:${PIHOLE_VERSION}-arm64-${DEBIAN_VERSION:-buster}
|
||||||
build:
|
build:
|
||||||
|
@ -49,14 +36,10 @@ services:
|
||||||
args:
|
args:
|
||||||
<<: *common-args
|
<<: *common-args
|
||||||
PIHOLE_BASE: pihole/debian-debootstrap:arm64-${DEBIAN_VERSION:-buster}-slim
|
PIHOLE_BASE: pihole/debian-debootstrap:arm64-${DEBIAN_VERSION:-buster}-slim
|
||||||
PIHOLE_ARCH: arm64
|
|
||||||
S6_ARCH: aarch64
|
|
||||||
i386:
|
i386:
|
||||||
image: pihole:${PIHOLE_VERSION}-i386-${DEBIAN_VERSION:-buster}
|
image: pihole:${PIHOLE_VERSION}-i386-${DEBIAN_VERSION:-buster}
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
args:
|
args:
|
||||||
<<: *common-args
|
<<: *common-args
|
||||||
PIHOLE_BASE: pihole/debian-debootstrap:i386-${DEBIAN_VERSION:-buster}-slim
|
PIHOLE_BASE: pihole/debian-debootstrap:i386-${DEBIAN_VERSION:-buster}-slim
|
||||||
PIHOLE_ARCH: i386
|
|
||||||
S6_ARCH: x86
|
|
28
install.sh
28
install.sh
|
@ -8,13 +8,31 @@ WEB_LOCAL_REPO=/var/www/html/admin
|
||||||
|
|
||||||
setupVars=/etc/pihole/setupVars.conf
|
setupVars=/etc/pihole/setupVars.conf
|
||||||
|
|
||||||
|
s6_download_url() {
|
||||||
|
DETECTED_ARCH=$(dpkg --print-architecture)
|
||||||
|
S6_ARCH=$DETECTED_ARCH
|
||||||
|
case $DETECTED_ARCH in
|
||||||
|
armel)
|
||||||
|
S6_ARCH="arm";;
|
||||||
|
armhf)
|
||||||
|
S6_ARCH="arm";;
|
||||||
|
arm64)
|
||||||
|
S6_ARCH="aarch64";;
|
||||||
|
i386)
|
||||||
|
S6_ARCH="x86";;
|
||||||
|
ppc64el)
|
||||||
|
S6_ARCH="ppc64le";;
|
||||||
|
esac
|
||||||
|
echo "https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.gz"
|
||||||
|
}
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install --no-install-recommends -y curl procps ca-certificates git
|
apt-get install --no-install-recommends -y curl procps ca-certificates git
|
||||||
# curl in armhf-buster's image has SSL issues. Running c_rehash fixes it.
|
# curl in armhf-buster's image has SSL issues. Running c_rehash fixes it.
|
||||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=923479
|
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=923479
|
||||||
c_rehash
|
c_rehash
|
||||||
ln -s `which echo` /usr/local/bin/whiptail
|
ln -s `which echo` /usr/local/bin/whiptail
|
||||||
curl -L -s $S6OVERLAY_RELEASE | tar xvzf - -C /
|
curl -L -s "$(s6_download_url)" | tar xvzf - -C /
|
||||||
mv /init /s6-init
|
mv /init /s6-init
|
||||||
|
|
||||||
# Preseed variables to assist with using --unattended install
|
# Preseed variables to assist with using --unattended install
|
||||||
|
@ -68,12 +86,12 @@ sed -i $'s/)\s*reconfigurePiholeFunc/) unsupportedFunc/g' /usr/local/bin/pihole
|
||||||
sed -i $'s/)\s*uninstallFunc/) unsupportedFunc/g' /usr/local/bin/pihole
|
sed -i $'s/)\s*uninstallFunc/) unsupportedFunc/g' /usr/local/bin/pihole
|
||||||
|
|
||||||
# Inject a message into the debug scripts Operating System section to indicate that the debug log comes from a Docker system.
|
# Inject a message into the debug scripts Operating System section to indicate that the debug log comes from a Docker system.
|
||||||
sed -i $'s/echo_current_diagnostic "Operating system"/echo_current_diagnostic "Operating system"\\\n log_write "${INFO} Pi-hole Docker Container: ${PIHOLE_TAG:-PIHOLE_TAG is unset}"/g' /opt/pihole/piholeDebug.sh
|
sed -i $'s/echo_current_diagnostic "Operating system"/echo_current_diagnostic "Operating system"\\\n log_write "${INFO} Pi-hole Docker Container: ${PIHOLE_VERSION:-PIHOLE_VERSION is unset}"/g' /opt/pihole/piholeDebug.sh
|
||||||
|
|
||||||
# Inject container tag into web interface footer...
|
# Inject container tag into web interface footer...
|
||||||
sed -i $"s/<ul class=\"list-unstyled\">/<ul class=\"list-unstyled\">\\n<strong><li>Docker Tag<\/strong> ${PIHOLE_TAG//\//\\/}<\/li>/g" /var/www/html/admin/scripts/pi-hole/php/footer.php
|
sed -i $"s/<ul class=\"list-unstyled\">/<ul class=\"list-unstyled\">\\n<strong><li>Docker Tag<\/strong> ${PIHOLE_VERSION}<\/li>/g" /var/www/html/admin/scripts/pi-hole/php/footer.php
|
||||||
sed -i $"s/<ul class=\"list-inline\">/<strong>Docker Tag<\/strong> ${PIHOLE_TAG//\//\\/}\\n<ul class=\"list-inline\">/g" /var/www/html/admin/scripts/pi-hole/php/footer.php
|
sed -i $"s/<ul class=\"list-inline\">/<strong>Docker Tag<\/strong> ${PIHOLE_VERSION}\\n<ul class=\"list-inline\">/g" /var/www/html/admin/scripts/pi-hole/php/footer.php
|
||||||
|
|
||||||
touch /.piholeFirstBoot
|
touch /.piholeFirstBoot
|
||||||
|
|
||||||
echo 'Docker install successful'
|
echo 'Docker install successful'
|
|
@ -36,4 +36,4 @@ fi
|
||||||
|
|
||||||
pihole -v
|
pihole -v
|
||||||
|
|
||||||
echo " Container tag is: ${PIHOLE_TAG}"
|
echo " Container tag is: ${PIHOLE_VERSION}"
|
Loading…
Reference in New Issue