chore(docker): update docker-compose to use pre-built image and bind mount

- Use docker.io/sipeed/picoclaw:latest instead of building locally
- Replace named volume with bind mount ./data:/root/.picoclaw
- Move docker-compose.yml into docker/ directory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Guoguo 2026-02-26 04:46:55 -08:00
parent 26a33b5b33
commit 7c893cca35

View file

@ -1,12 +1,10 @@
services: services:
# ───────────────────────────────────────────── # ─────────────────────────────────────────────
# PicoClaw Agent (one-shot query) # PicoClaw Agent (one-shot query)
# docker compose run --rm picoclaw-agent -m "Hello" # docker compose -f docker/docker-compose.yml run --rm picoclaw-agent -m "Hello"
# ───────────────────────────────────────────── # ─────────────────────────────────────────────
picoclaw-agent: picoclaw-agent:
build: image: docker.io/sipeed/picoclaw:latest
context: .
dockerfile: Dockerfile
container_name: picoclaw-agent container_name: picoclaw-agent
profiles: profiles:
- agent - agent
@ -14,20 +12,17 @@ services:
#extra_hosts: #extra_hosts:
# - "host.docker.internal:host-gateway" # - "host.docker.internal:host-gateway"
volumes: volumes:
- ./config/config.json:/home/picoclaw/.picoclaw/config.json:ro - ./data:/root/.picoclaw
- picoclaw-workspace:/home/picoclaw/.picoclaw/workspace
entrypoint: ["picoclaw", "agent"] entrypoint: ["picoclaw", "agent"]
stdin_open: true stdin_open: true
tty: true tty: true
# ───────────────────────────────────────────── # ─────────────────────────────────────────────
# PicoClaw Gateway (Long-running Bot) # PicoClaw Gateway (Long-running Bot)
# docker compose up picoclaw-gateway # docker compose -f docker/docker-compose.yml up picoclaw-gateway
# ───────────────────────────────────────────── # ─────────────────────────────────────────────
picoclaw-gateway: picoclaw-gateway:
build: image: docker.io/sipeed/picoclaw:latest
context: .
dockerfile: Dockerfile
container_name: picoclaw-gateway container_name: picoclaw-gateway
restart: unless-stopped restart: unless-stopped
profiles: profiles:
@ -36,11 +31,4 @@ services:
#extra_hosts: #extra_hosts:
# - "host.docker.internal:host-gateway" # - "host.docker.internal:host-gateway"
volumes: volumes:
# Configuration file - ./data:/root/.picoclaw
- ./config/config.json:/home/picoclaw/.picoclaw/config.json:ro
# Persistent workspace (sessions, memory, logs)
- picoclaw-workspace:/home/picoclaw/.picoclaw/workspace
command: ["gateway"]
volumes:
picoclaw-workspace: