Updated deploy script (still needs work), fixed dead link
Signed-off-by: Adam Hill <adam@diginc.us>
This commit is contained in:
parent
20e8ce208c
commit
5cc28d769a
|
@ -1,13 +1,5 @@
|
|||
FROM multiarch/debian-debootstrap:arm64-stretch-slim
|
||||
|
||||
LABEL image="pihole/pihole:v4.0_aarch64"
|
||||
LABEL maintainer="adam@diginc.us"
|
||||
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"
|
||||
|
||||
ENV VERSION v4.0
|
||||
ENV ARCH aarch64
|
||||
ENV PATH /opt/pihole:${PATH}
|
||||
|
||||
COPY install.sh /usr/local/bin/docker-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
|
||||
|
@ -44,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"]
|
|
@ -1,13 +1,5 @@
|
|||
FROM multiarch/debian-debootstrap:armel-stretch-slim
|
||||
|
||||
LABEL image="pihole/pihole:v4.0_armel"
|
||||
LABEL maintainer="adam@diginc.us"
|
||||
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"
|
||||
|
||||
ENV VERSION v4.0
|
||||
ENV ARCH armel
|
||||
ENV PATH /opt/pihole:${PATH}
|
||||
|
||||
COPY install.sh /usr/local/bin/docker-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
|
||||
|
@ -44,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"]
|
|
@ -1,13 +1,5 @@
|
|||
FROM multiarch/debian-debootstrap:armhf-stretch-slim
|
||||
|
||||
LABEL image="pihole/pihole:v4.0_armhf"
|
||||
LABEL maintainer="adam@diginc.us"
|
||||
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"
|
||||
|
||||
ENV VERSION v4.0
|
||||
ENV ARCH armhf
|
||||
ENV PATH /opt/pihole:${PATH}
|
||||
|
||||
COPY install.sh /usr/local/bin/docker-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
|
||||
|
@ -44,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"]
|
|
@ -162,7 +162,7 @@ Similarly for the webserver you can customize configs in /etc/lighttpd
|
|||
|
||||
### Systemd init script
|
||||
|
||||
As long as your docker system service auto starts on boot and you run your container with `--restart=unless-stopped` your container should always start on boot and restart on crashes. If you prefer to have your docker container run as a systemd service instead, add the file [pihole.service](https://raw.githubusercontent.com/pihole/docker-pi-hole/master/pihole.service) to "/etc/systemd/system"; customize whatever your container name is and remove `--restart=unless-stopped` from your docker run. Then after you have initially created the docker container using the docker run command above, you can control it with "systemctl start pihole" or "systemctl stop pihole" (instead of `docker start`/`docker stop`). You can also enable it to auto-start on boot with "systemctl enable pihole" (as opposed to `--restart=unless-stopped` and making sure docker service auto-starts on boot).
|
||||
As long as your docker system service auto starts on boot and you run your container with `--restart=unless-stopped` your container should always start on boot and restart on crashes. If you prefer to have your docker container run as a systemd service instead, add the file [pihole.service](https://raw.githubusercontent.com/pi-hole/docker-pi-hole/master/pihole.service) to "/etc/systemd/system"; customize whatever your container name is and remove `--restart=unless-stopped` from your docker run. Then after you have initially created the docker container using the docker run command above, you can control it with "systemctl start pihole" or "systemctl stop pihole" (instead of `docker start`/`docker stop`). You can also enable it to auto-start on boot with "systemctl enable pihole" (as opposed to `--restart=unless-stopped` and making sure docker service auto-starts on boot).
|
||||
|
||||
NOTE: After initial run you may need to manually stop the docker container with "docker stop pihole" before the systemctl can start controlling the container.
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ remoteimg="$namespace/$localimg"
|
|||
branch="$(parse_git_branch)"
|
||||
version="${version:-unset}"
|
||||
dry="${dry}"
|
||||
latest="${latest:-false}" # true as shell env var to deploy latest
|
||||
|
||||
if [[ -n "$dry" ]]; then dry='echo '; fi
|
||||
|
||||
|
@ -24,7 +25,7 @@ if [[ "$version" == 'unset' ]]; then
|
|||
echo "Version number var is unset and master branch needs a version...pass in \$version variable!"
|
||||
exit 1
|
||||
elif [[ "$branch" = "release/"* ]]; then
|
||||
version="$(echo $branch | grep -Po 'v[\d.-]')"
|
||||
version="$(echo $branch | grep -Po 'v[\d\.-]*')"
|
||||
echo "Version number is being taken from this release branch $version"
|
||||
else
|
||||
version="$branch"
|
||||
|
@ -39,15 +40,18 @@ echo "branch: $branch"
|
|||
[[ -n "$dry" ]] && echo "DRY RUN: $dry"
|
||||
echo "Example tagging: docker tag $localimg:$tag $remoteimg:${version}_amd64"
|
||||
|
||||
$dry ./Dockerfile.py
|
||||
$dry ./Dockerfile.py --arch=amd64 --arch=armhf --arch=aarch64
|
||||
|
||||
# ARMv6/armel doesn't have a FTL binary for v4.0 pi-hole
|
||||
# for tag in debian_armhf debian_aarch64 debian_armel; do
|
||||
for tag in amd64 armhf aarch64; do
|
||||
# Verison specific tags for ongoing history
|
||||
$dry docker tag $localimg:$tag $remoteimg:${version}_${tag}
|
||||
$dry docker push pihole/pihole-multiarch:${version}_${tag}
|
||||
# Floating latest tags
|
||||
$dry docker tag pi-hole-multiarch:$tag pihole/pihole-multiarch:${tag}
|
||||
$dry docker push pihole/pihole-multiarch:${tag}
|
||||
$dry docker tag $localimg:v4.0_$tag $remoteimg:${version}_${tag}
|
||||
$dry docker push pihole/pihole:${version}_${tag}
|
||||
# Floating latest tags (Conditionalize these to master?)
|
||||
if [[ "$tag" == 'amd64' ]] && [[ "$branch" == 'master' || "$latest" == 'true' ]] ; then
|
||||
# Latest tag should become a manifest for multiple architectures, not just amd64!
|
||||
$dry docker tag pi-hole:v4.0_amd64 pihole/pihole:latest
|
||||
$dry docker push pihole/pihole:latest
|
||||
fi;
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue