From 1fbc9bbd0e0652ff35f73cdcd523a26200a58cfa Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Mon, 21 Sep 2026 20:47:53 +0800 Subject: [PATCH] fix(cloudflare): omit Litestream archive from runtime image (#154778) --- scripts/cloudflare/Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/cloudflare/Dockerfile b/scripts/cloudflare/Dockerfile index 18fbeba9d648..b4f2246dcb3b 100644 --- a/scripts/cloudflare/Dockerfile +++ b/scripts/cloudflare/Dockerfile @@ -1,7 +1,7 @@ # Replace the placeholder with an immutable linux/amd64 digest from the official # Docker Hub repository. Cloudflare Containers cannot pull OpenClaw from GHCR. ARG OPENCLAW_IMAGE=openclaw/openclaw@sha256: -FROM ${OPENCLAW_IMAGE} +FROM ${OPENCLAW_IMAGE} AS litestream USER root @@ -12,8 +12,13 @@ ADD --checksum=sha256:${LITESTREAM_SHA256} \ https://github.com/benbjohnson/litestream/releases/download/v${LITESTREAM_VERSION}/litestream-${LITESTREAM_VERSION}-linux-x86_64.tar.gz \ /tmp/litestream.tar.gz RUN tar -xzf /tmp/litestream.tar.gz -C /usr/local/bin litestream \ - && chmod 0755 /usr/local/bin/litestream \ - && rm /tmp/litestream.tar.gz + && chmod 0755 /usr/local/bin/litestream + +FROM ${OPENCLAW_IMAGE} +USER root + +# Copy only the binary so the download archive stays out of runtime layers. +COPY --from=litestream /usr/local/bin/litestream /usr/local/bin/litestream COPY litestream.yml /etc/litestream.yml COPY entrypoint.sh /usr/local/bin/cloudflare-entrypoint.sh