From a41bd551052b1741e2e6cf6bb0608f66bf6c0315 Mon Sep 17 00:00:00 2001 From: Nicolas Favre-Felix Date: Sun, 21 Jun 2020 15:28:39 -0700 Subject: [PATCH] Update Dockerfile to no longer require the latest tag The Dockerfile used to refer to the latest published tag for Webdis. This meant updating the file every time a new release was published. This change uses the GitHub API to find the latest tag before downloading and building the corresponding release. --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4ae09b2..f921e55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ FROM alpine:3.11.3 AS stage MAINTAINER Nicolas Favre-Felix -RUN apk update && apk add wget make gcc libevent-dev msgpack-c-dev musl-dev bsd-compat-headers -RUN wget https://github.com/nicolasff/webdis/archive/0.1.10.tar.gz -O webdis-0.1.10.tar.gz -RUN tar -xvzf webdis-0.1.10.tar.gz -RUN cd webdis-0.1.10 && make && make install && cd .. +RUN apk update && apk add wget make gcc libevent-dev msgpack-c-dev musl-dev bsd-compat-headers jq +RUN wget -q https://api.github.com/repos/nicolasff/webdis/tags -O /dev/stdout | jq '.[] | .name' | head -1 | sed 's/"//g' > latest +RUN wget https://github.com/nicolasff/webdis/archive/$(cat latest).tar.gz -O webdis-latest.tar.gz +RUN tar -xvzf webdis-latest.tar.gz +RUN cd webdis-$(cat latest) && make && make install && cd .. RUN sed -i -e 's/"daemonize":.*true,/"daemonize": false,/g' /etc/webdis.prod.json # main image