mirror of
https://github.com/0xMassi/webclaw.git
synced 2026-04-25 00:06:21 +02:00
v0.3.13 switched ENTRYPOINT to ["webclaw"] to make `docker run IMAGE https://example.com` work. That broke a different use case: downstream Dockerfiles that `FROM ghcr.io/0xmassi/webclaw` and set their own CMD ["./setup.sh"] — the child's ./setup.sh becomes arg to webclaw, which tries to fetch it as a URL and fails: fetch error: request failed: error sending request for uri (https://./setup.sh): client error (Connect) Both Dockerfile and Dockerfile.ci now use docker-entrypoint.sh which: - forwards flags (-*) and URLs (http://, https://) to `webclaw` - exec's anything else directly Test matrix (all pass locally): docker run IMAGE https://example.com → webclaw scrape ok docker run IMAGE --help → webclaw --help ok docker run IMAGE → default CMD, --help docker run IMAGE bash → bash runs FROM IMAGE + CMD ["./setup.sh"] → setup.sh runs, webclaw available Default CMD is ["webclaw", "--help"] so bare `docker run IMAGE` still prints help. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
22 lines
818 B
Text
22 lines
818 B
Text
# Slim runtime image — uses pre-built binaries from the release.
|
|
# The full Dockerfile (multi-stage Rust build) is for local development.
|
|
# CI uses this to avoid 60+ min QEMU cross-compilation.
|
|
ARG BINARY_DIR=binaries
|
|
|
|
FROM ubuntu:24.04
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ARG BINARY_DIR
|
|
COPY ${BINARY_DIR}/webclaw /usr/local/bin/webclaw
|
|
COPY ${BINARY_DIR}/webclaw-mcp /usr/local/bin/webclaw-mcp
|
|
|
|
# Entrypoint shim: forwards webclaw args/URL to the binary, but exec's other
|
|
# commands directly so this image can be used as a FROM base with custom CMD.
|
|
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
CMD ["webclaw", "--help"]
|