fix(cloudflare): omit Litestream archive from runtime image (#154778)

This commit is contained in:
Vincent Koc 2026-09-21 20:47:53 +08:00 • committed by GitHub
parent 6c5bcfec43
commit 1fbc9bbd0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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:<official-openclaw-image-digest>
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