diff --git a/.github/renovate.json b/.github/renovate.json index 84e30fd..dbfdcb1 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -32,6 +32,15 @@ ], "datasourceTemplate": "github-releases", "depNameTemplate": "louislam/uptime-kuma" + }, + { + "fileMatch": ["/Dockerfile$"], + "matchStrings": [ + "ARG CLOUDFLARED_VERSION=[\"']?(?.+?)[\"']?\\s+" + ], + "datasourceTemplate": "github-releases", + "depNameTemplate": "cloudflare/cloudflared", + "versioningTemplate": "loose" } ], "packageRules": [ diff --git a/uptime-kuma/Dockerfile b/uptime-kuma/Dockerfile index bfd7016..e006754 100644 --- a/uptime-kuma/Dockerfile +++ b/uptime-kuma/Dockerfile @@ -13,6 +13,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Setup base ARG UPTIME_KUMA_VERSION="1.23.11" +ARG CLOUDFLARED_VERSION="2023.10.0" +ARG BUILD_ARCH=amd64 # hadolint ignore=DL3003,DL3042 RUN \ apk add --no-cache --virtual .build-dependencies \ @@ -39,6 +41,13 @@ RUN \ --omit=dev \ && npm run download-dist \ \ + && if [ "${BUILD_ARCH}" = "aarch64" ]; then CLOUDFLARED_ARCH="arm64"; \ + elif [ "${BUILD_ARCH}" = "amd64" ]; then CLOUDFLARED_ARCH="amd64"; \ + elif [ "${BUILD_ARCH}" = "armv7" ]; then CLOUDFLARED_ARCH="arm"; fi \ + && curl -L --fail -o /usr/bin/cloudflared \ + "https://github.com/cloudflare/cloudflared/releases/download/${CLOUDFLARED_VERSION}/cloudflared-linux-${CLOUDFLARED_ARCH}" \ + && chmod +x /usr/bin/cloudflared \ + \ && npm cache clear --force \ \ && apk del --no-cache --purge .build-dependencies \ @@ -48,12 +57,10 @@ RUN \ /root/.npm \ /root/.npmrc - # Copy root filesystem COPY rootfs / # Build arguments -ARG BUILD_ARCH ARG BUILD_DATE ARG BUILD_DESCRIPTION ARG BUILD_NAME