From e58874b8b1db7847b5958c5653739185c5b3652e Mon Sep 17 00:00:00 2001 From: merlinmiao <820962493@qq.com> Date: Sun, 5 Apr 2026 20:50:33 +0800 Subject: [PATCH] fix(docker): set PICOCLAW_HOME env var to ensure consistent path When the container runs as a non-root user (picoclaw UID 1000), os.UserHomeDir() returns /home/picoclaw, causing picoclaw to look for config at /home/picoclaw/.picoclaw instead of /root/.picoclaw where the volume is mounted. Setting PICOCLAW_HOME=/root/.picoclaw ensures picoclaw uses the correct path regardless of which user the container runs as. Fixes #2269 Co-Authored-By: Claude Opus 4.6 --- docker/docker-compose.full.yml | 4 ++++ docker/docker-compose.yml | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/docker/docker-compose.full.yml b/docker/docker-compose.full.yml index 6f34448c4..ba1533abb 100644 --- a/docker/docker-compose.full.yml +++ b/docker/docker-compose.full.yml @@ -10,6 +10,8 @@ services: container_name: picoclaw-agent-full profiles: - agent + environment: + - PICOCLAW_HOME=/root/.picoclaw volumes: - ../config/config.json:/root/.picoclaw/config.json:ro - picoclaw-workspace:/root/.picoclaw/workspace @@ -30,6 +32,8 @@ services: restart: unless-stopped profiles: - gateway + environment: + - PICOCLAW_HOME=/root/.picoclaw volumes: # Configuration file - ../config/config.json:/root/.picoclaw/config.json:ro diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 0bf46a2ae..a7d708d14 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -11,6 +11,8 @@ services: # Uncomment to access host network; leave commented unless needed. #extra_hosts: # - "host.docker.internal:host-gateway" + environment: + - PICOCLAW_HOME=/root/.picoclaw volumes: - ./data:/root/.picoclaw entrypoint: ["picoclaw", "agent"] @@ -30,6 +32,8 @@ services: # Uncomment to access host network; leave commented unless needed. #extra_hosts: # - "host.docker.internal:host-gateway" + environment: + - PICOCLAW_HOME=/root/.picoclaw volumes: - ./data:/root/.picoclaw @@ -45,6 +49,7 @@ services: - launcher environment: - PICOCLAW_GATEWAY_HOST=0.0.0.0 + - PICOCLAW_HOME=/root/.picoclaw ports: - "127.0.0.1:18800:18800" - "127.0.0.1:18790:18790"