Files
chrome-use/docker/docker-compose.yml
leeguooooo 61060486f4
Release binaries / Build macOS ARM64 (push) Has been cancelled
Release binaries / Build macOS x64 (push) Has been cancelled
Release binaries / Build Linux ARM64 (push) Has been cancelled
Release binaries / Build Linux musl ARM64 (push) Has been cancelled
Release binaries / Build Linux musl x64 (push) Has been cancelled
Release binaries / Build Linux x64 (push) Has been cancelled
Release binaries / Build Windows x64 (push) Has been cancelled
Release binaries / Attach binaries to GitHub Release (push) Has been cancelled
rebrand: agent-browser-stealth → chrome-use, de-fork, reset to v1.0.0
Standalone product rename across the whole repo (issue: project identity):

- Binary/package/repo/skill/docs: agent-browser[-stealth] → chrome-use
  (single binary name `chrome-use`; old aliases agent-browser/abs dropped).
- Version: 0.27.0-fork.51 → 1.0.0 (drop the upstream-fork counter).
- Native-messaging host: com.agent_browser.connect → com.leeguoo.chrome_use
  (CLI + ab-connect extension in lockstep — this is a breaking handshake change,
  extension bumped 0.4.2 → 0.5.0, needs a Web Store republish).
- Config dir: ~/.agent-browser → ~/.chrome-use.
- README/zh: reframed from "stealth fork of agent-browser" to a standalone
  product with a small `originally based on vercel-labs/agent-browser` credit.
- Kept AGENT_BROWSER_* env vars working (63 vars across the codebase; renaming
  them would break every existing script/skill for no user-facing gain).

Build green, 802 unit tests pass, fmt + clippy clean. Upstream attribution to
vercel-labs/agent-browser preserved.
2026-06-12 12:56:21 +09:00

92 lines
3.6 KiB
YAML

# Docker Compose for building chrome-use
# Usage: docker compose -f docker/docker-compose.yml run build-linux
# docker compose -f docker/docker-compose.yml run build-windows
#
# Note: macOS builds should be done natively on macOS for compatibility.
services:
# Build for Linux platforms
build-linux:
build:
context: ..
dockerfile: docker/Dockerfile.build
volumes:
- ../cli:/build
- ../bin:/output
command: |
-c '
set -e
echo "Building for Linux platforms (parallel)..."
# Build both targets in parallel
(echo "→ Linux x64" && cargo zigbuild --release --target x86_64-unknown-linux-gnu && cp /build/target/x86_64-unknown-linux-gnu/release/chrome-use /output/chrome-use-linux-x64 && chmod +x /output/chrome-use-linux-x64 && echo "✓ Linux x64 done") &
PID1=$$!
(echo "→ Linux ARM64" && cargo zigbuild --release --target aarch64-unknown-linux-gnu && cp /build/target/aarch64-unknown-linux-gnu/release/chrome-use /output/chrome-use-linux-arm64 && chmod +x /output/chrome-use-linux-arm64 && echo "✓ Linux ARM64 done") &
PID2=$$!
# Wait for both and check exit codes individually — without this
# the outer script exits 0 even if one of the parallel builds
# failed, silently leaving a stale binary in /output from the
# previous release. Caused 0.27.0-fork.5 to ship with a stale
# linux-x64 binary at the first publish attempt until caught
# manually by checking the embedded version string.
wait $$PID1 || { echo "✗ Linux x64 build failed"; exit 1; }
wait $$PID2 || { echo "✗ Linux ARM64 build failed"; exit 1; }
echo ""
echo "✓ Linux platforms built successfully!"
ls -la /output/chrome-use-linux-*
'
# Build for Windows
build-windows:
build:
context: ..
dockerfile: docker/Dockerfile.build
volumes:
- ../cli:/build
- ../bin:/output
command: |
-c '
set -e
echo "Building for Windows x64..."
cargo build --release --target x86_64-pc-windows-gnu
cp /build/target/x86_64-pc-windows-gnu/release/chrome-use.exe /output/chrome-use-win32-x64.exe
echo ""
echo "✓ Windows build completed!"
ls -la /output/chrome-use-win32-*
'
# Build for a single target (override with TARGET env var)
build-single:
build:
context: ..
dockerfile: docker/Dockerfile.build
volumes:
- ../cli:/build
- ../bin:/output
environment:
- TARGET=${TARGET:-x86_64-unknown-linux-gnu}
- OUTPUT_NAME=${OUTPUT_NAME:-chrome-use-linux-x64}
# NOTE: $$ escapes a literal $ for the in-container shell. A single $ is
# interpolated by docker compose at YAML parse time against the *host*
# environment, which silently drops script-local variables like SRC
# (caused 0.27.0-fork.7 to ship with a stale linux-arm64 binary because
# the cp command resolved to `cp "" "/output/"` after compose ate $SRC
# and $OUTPUT_NAME). $TARGET / $OUTPUT_NAME are set via `environment:`
# below — those are also passed into the container, so $$TARGET and
# $$OUTPUT_NAME read them at script time.
command: |
-c '
set -e
cargo zigbuild --release --target $$TARGET
SRC="/build/target/$$TARGET/release/chrome-use"
if [ -f "$$SRC.exe" ]; then SRC="$$SRC.exe"; fi
cp "$$SRC" "/output/$$OUTPUT_NAME"
chmod +x /output/$$OUTPUT_NAME 2>/dev/null || true
echo "✓ Built $$OUTPUT_NAME"
'