From 7a269e757ebbac6c5c2762b012767b30d3b6bdc6 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Mon, 20 Feb 2017 09:24:47 -0800 Subject: [PATCH] Debian buildpack image for docker (Need `curl` for testing, using scm version to add `curl` and `git`.) Signed-off-by: Dan Schaper --- automated install/basic-install.sh | 12 ++++++------ test/debian.Dockerfile | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index aead0583..98322cb7 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1155,18 +1155,18 @@ if [[ "${reconfigure}" == true ]]; then FTLinstall() { # Download and Install FTL binary local binary="${1}" - local latesttag + local latestURL echo ":::" echo -n "::: Installing FTL ... " - latesttag=$(curl -s https://api.github.com/repos/pi-hole/FTL/releases/latest | grep "tag_name" | sed "s/.*: \"//;s/\",//;") - if [ ! "${latesttag}" ]; then - echo "::: failed (error in getting latest release tag from GitHub)" + latestURL=$(curl -sI https://github.com/pi-hole/FTL/releases/latest | grep "Location" | awk '{print $2}') + if [ ! "${latestURL}" ]; then + echo "::: failed (error in getting latest release location from GitHub)" return 1 fi - if curl -sSL --fail "https://github.com/pi-hole/FTL/releases/download/${latesttag}/${binary}" -o "/opt/pihole/pihole-FTL"; then + if curl -sSL --fail "${latestURL}${binary}" -o "/tmp/pihole-FTL"; then echo "::: done" - install -m 0755 /opt/pihole/pihole-FTL /usr/bin + install -m 0755 /tmp/pihole-FTL /usr/bin touch /var/log/pihole-FTL.log /var/run/pihole-FTL.pid /var/run/pihole-FTL.port chmod 0666 /var/log/pihole-FTL.log /var/run/pihole-FTL.pid /var/run/pihole-FTL.port return 0 diff --git a/test/debian.Dockerfile b/test/debian.Dockerfile index 931c0ba7..66436f1a 100644 --- a/test/debian.Dockerfile +++ b/test/debian.Dockerfile @@ -1,4 +1,4 @@ -FROM debian:jessie +FROM buildpack-deps:jessie-scm ENV GITDIR /etc/.pihole ENV SCRIPTDIR /opt/pihole