switch to multi-arch

This commit is contained in:
aptalca
2024-02-15 20:57:42 -05:00
parent 8a76313cc8
commit 2cf5ad63c2
3 changed files with 31 additions and 18 deletions
+18 -8
View File
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1
# Build container
FROM ghcr.io/linuxserver/baseimage-alpine:3.18 AS buildstage
FROM ghcr.io/linuxserver/baseimage-alpine:3.19 AS buildstage
ARG MOD_VERSION
@@ -11,14 +11,24 @@ RUN \
MOD_VERSION=$(curl -s https://api.github.com/repos/cloudflare/cloudflared/releases/latest \
| jq -rc ".tag_name"); \
fi && \
echo "**** grab binaries ****" && \
mkdir -p /root-layer/cloudflared && \
curl -fo \
/root-layer/cloudflared/cloudflared-amd64 -L \
"https://github.com/cloudflare/cloudflared/releases/download/${MOD_VERSION}/cloudflared-linux-amd64" && \
curl -fo \
/root-layer/cloudflared/cloudflared-arm64 -L \
"https://github.com/cloudflare/cloudflared/releases/download/${MOD_VERSION}/cloudflared-linux-arm64" && \
if [ $(uname -m) = "x86_64" ]; then \
echo "**** Downloading x86_64 binaries ****" && \
curl -fo \
/root-layer/cloudflared/cloudflared -L \
"https://github.com/cloudflare/cloudflared/releases/download/${MOD_VERSION}/cloudflared-linux-amd64" && \
curl -fo \
/root-layer/cloudflared/yq -L \
"https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64"; \
elif [ $(uname -m) = "aarch64" ]; then \
echo "**** Downloading aarch64 binaries ****" && \
curl -fo \
/root-layer/cloudflared/cloudflared -L \
"https://github.com/cloudflare/cloudflared/releases/download/${MOD_VERSION}/cloudflared-linux-arm64" && \
curl -fo \
/root-layer/cloudflared/yq -L \
"https://github.com/mikefarah/yq/releases/latest/download/yq_linux_arm64"; \
fi && \
chmod +x /root-layer/cloudflared/*
COPY root/ /root-layer/