This guide uses Docker to run ZeroClaw, an ultra-lightweight Rust AI agent runtime.
For Docker installation, see Docker.
ZeroClaw provides Dockerfiles for building container images. Check the upstream repository for official image availability.
Official Resources:
git clone https://github.com/zeroclaw-labs/zeroclaw.git
cd zeroclaw
./bootstrap.sh --docker
git clone https://github.com/zeroclaw-labs/zeroclaw.git
cd zeroclaw
docker build -t zeroclaw:latest .
Check the GitHub repository for official container registry links (GitHub Container Registry or Docker Hub).
docker run -d \
--name zeroclaw \
-p 3000:3000 \
-v zeroclaw-data:/root/.zeroclaw \
-v $(pwd)/config.toml:/root/.zeroclaw/config.toml:ro \
--read-only \
--tmpfs /tmp \
zeroclaw:latest
services:
zeroclaw:
image: zeroclaw:latest
container_name: zeroclaw
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000" # Bind to localhost by default
volumes:
- zeroclaw-data:/root/.zeroclaw
- ./config.toml:/root/.zeroclaw/config.toml:ro
read_only: true
tmpfs:
- /tmp
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE
volumes:
zeroclaw-data:
Create a configuration file before starting the container:
mkdir -p ~/.zeroclaw
cat > ~/.zeroclaw/config.toml << EOF
api_key = 'sk-your-api-key'
provider = 'openai'
channels = ['cli']
workspace_only = true
log_level = 'info'
EOF
Then mount it to the container:
docker run -d \
--name zeroclaw \
-v ~/.zeroclaw:/root/.zeroclaw:ro \
zeroclaw:latest
# Check container status
docker ps | grep zeroclaw
# View logs
docker logs zeroclaw
# Test the CLI
docker exec -it zeroclaw zeroclaw --help
For production deployments, apply these security measures:
services:
zeroclaw:
# ... base config above ...
# Network restrictions
networks:
- zeroclaw-internal
# Resource limits
deploy:
resources:
limits:
cpus: '1.0'
memory: 256M
reservations:
cpus: '0.25'
memory: 32M
networks:
zeroclaw-internal:
internal: true
~/.zeroclaw/config.toml~/.zeroclaw/.secret_key# View detailed logs
docker logs --follow zeroclaw
# Access container shell
docker exec -it zeroclaw /bin/sh
# Test configuration
docker exec zeroclaw zeroclaw test --config /root/.zeroclaw/config.toml
Any questions?
Feel free to contact us. Find all contact information on our contact page.