Building from Source
If you want to build the Docker image from source instead of pulling from ghcr.io:
Clone and build
git clone https://github.com/thisnick/agent-wechat.gitcd agent-wechat
# Auto-detect host architecturepnpm build:image
# Or specify architecture explicitlypnpm build:image:arm64 # Apple Siliconpnpm build:image:amd64 # Intel / AMDWhat the build does
The Dockerfile uses a multi-stage build:
- Builder stage — compiles the Rust agent-server binary in release mode
- Runtime stage — sets up Ubuntu 22.04 with Xvfb, AT-SPI, WeChat, noVNC, ffmpeg, and copies the compiled binary
Development workflow
For active development, you don’t need to rebuild the full image each time:
pnpm install # install dependenciespnpm build # build CLI + shared typespnpm dev:deploy # cross-compile Rust & deploy to a running containerpnpm generate-types # regenerate TypeScript types after Rust struct changes