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 <noreply@anthropic.com>
This commit is contained in:
parent
2701037efb
commit
e58874b8b1
2 changed files with 9 additions and 0 deletions
|
|
@ -10,6 +10,8 @@ services:
|
||||||
container_name: picoclaw-agent-full
|
container_name: picoclaw-agent-full
|
||||||
profiles:
|
profiles:
|
||||||
- agent
|
- agent
|
||||||
|
environment:
|
||||||
|
- PICOCLAW_HOME=/root/.picoclaw
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/config.json:/root/.picoclaw/config.json:ro
|
- ../config/config.json:/root/.picoclaw/config.json:ro
|
||||||
- picoclaw-workspace:/root/.picoclaw/workspace
|
- picoclaw-workspace:/root/.picoclaw/workspace
|
||||||
|
|
@ -30,6 +32,8 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
profiles:
|
profiles:
|
||||||
- gateway
|
- gateway
|
||||||
|
environment:
|
||||||
|
- PICOCLAW_HOME=/root/.picoclaw
|
||||||
volumes:
|
volumes:
|
||||||
# Configuration file
|
# Configuration file
|
||||||
- ../config/config.json:/root/.picoclaw/config.json:ro
|
- ../config/config.json:/root/.picoclaw/config.json:ro
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ services:
|
||||||
# Uncomment to access host network; leave commented unless needed.
|
# Uncomment to access host network; leave commented unless needed.
|
||||||
#extra_hosts:
|
#extra_hosts:
|
||||||
# - "host.docker.internal:host-gateway"
|
# - "host.docker.internal:host-gateway"
|
||||||
|
environment:
|
||||||
|
- PICOCLAW_HOME=/root/.picoclaw
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/root/.picoclaw
|
- ./data:/root/.picoclaw
|
||||||
entrypoint: ["picoclaw", "agent"]
|
entrypoint: ["picoclaw", "agent"]
|
||||||
|
|
@ -30,6 +32,8 @@ services:
|
||||||
# Uncomment to access host network; leave commented unless needed.
|
# Uncomment to access host network; leave commented unless needed.
|
||||||
#extra_hosts:
|
#extra_hosts:
|
||||||
# - "host.docker.internal:host-gateway"
|
# - "host.docker.internal:host-gateway"
|
||||||
|
environment:
|
||||||
|
- PICOCLAW_HOME=/root/.picoclaw
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/root/.picoclaw
|
- ./data:/root/.picoclaw
|
||||||
|
|
||||||
|
|
@ -45,6 +49,7 @@ services:
|
||||||
- launcher
|
- launcher
|
||||||
environment:
|
environment:
|
||||||
- PICOCLAW_GATEWAY_HOST=0.0.0.0
|
- PICOCLAW_GATEWAY_HOST=0.0.0.0
|
||||||
|
- PICOCLAW_HOME=/root/.picoclaw
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:18800:18800"
|
- "127.0.0.1:18800:18800"
|
||||||
- "127.0.0.1:18790:18790"
|
- "127.0.0.1:18790:18790"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue