diff --git a/http-tunnel/.build-env b/http-tunnel/.build-env deleted file mode 100644 index e387fdc..0000000 --- a/http-tunnel/.build-env +++ /dev/null @@ -1 +0,0 @@ -BUILD_PLATFORMS=linux/amd64,linux/arm/v6 diff --git a/http-tunnel/Dockerfile b/http-tunnel/Dockerfile index 5681f50..16d26ee 100644 --- a/http-tunnel/Dockerfile +++ b/http-tunnel/Dockerfile @@ -3,8 +3,9 @@ FROM alpine:latest AS builder ARG TARGETPLATFORM RUN DOWNLOAD_ARCH=$(echo ${TARGETPLATFORM} | cut -d"/" -f 2) \ - && apk add --no-cache curl \ - && DOWNLOAD_URL=$(curl -s https://api.github.com/repos/mmatczuk/go-http-tunnel/releases/latest | grep "browser_download_url" | grep "tunnel_linux_"${DOWNLOAD_ARCH}"\." | cut -d\" -f4) \ + && if [[ $DOWNLOAD_ARCH == arm* ]] ; then DOWNLOAD_ARCH=arm ; fi \ + && apk add --no-cache curl jq \ + && DOWNLOAD_URL=$(curl -s https://api.github.com/repos/mmatczuk/go-http-tunnel/releases/latest | jq -r '.assets | map(select(.name == "tunnel_linux_'${DOWNLOAD_ARCH}'.tar.gz"))[0].browser_download_url') \ && curl --retry 3 -L -s -o tunnel_linux_arm.tar.gz ${DOWNLOAD_URL} \ && tar zxvf tunnel_linux_arm.tar.gz