Corrected the http-tunnel build

This commit is contained in:
2022-05-08 12:42:47 +02:00
parent 041bbcc27e
commit 902c3babc2
2 changed files with 3 additions and 3 deletions

View File

@@ -1 +0,0 @@
BUILD_PLATFORMS=linux/amd64,linux/arm/v6

View File

@@ -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