Debian buildpack image for docker (Need curl for testing, using scm version to add curl and git.)

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2017-02-20 09:24:47 -08:00
parent 87edbeaf58
commit 7a269e757e
No known key found for this signature in database
GPG key ID: 572E999E385B7BFC
2 changed files with 7 additions and 7 deletions

View file

@ -1155,18 +1155,18 @@ if [[ "${reconfigure}" == true ]]; then
FTLinstall() { FTLinstall() {
# Download and Install FTL binary # Download and Install FTL binary
local binary="${1}" local binary="${1}"
local latesttag local latestURL
echo ":::" echo ":::"
echo -n "::: Installing FTL ... " echo -n "::: Installing FTL ... "
latesttag=$(curl -s https://api.github.com/repos/pi-hole/FTL/releases/latest | grep "tag_name" | sed "s/.*: \"//;s/\",//;") latestURL=$(curl -sI https://github.com/pi-hole/FTL/releases/latest | grep "Location" | awk '{print $2}')
if [ ! "${latesttag}" ]; then if [ ! "${latestURL}" ]; then
echo "::: failed (error in getting latest release tag from GitHub)" echo "::: failed (error in getting latest release location from GitHub)"
return 1 return 1
fi 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" 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 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 chmod 0666 /var/log/pihole-FTL.log /var/run/pihole-FTL.pid /var/run/pihole-FTL.port
return 0 return 0

View file

@ -1,4 +1,4 @@
FROM debian:jessie FROM buildpack-deps:jessie-scm
ENV GITDIR /etc/.pihole ENV GITDIR /etc/.pihole
ENV SCRIPTDIR /opt/pihole ENV SCRIPTDIR /opt/pihole