多用户隔离 Docker 部署
基于本地已经有一份环境了,配置都在默认位置,复制并启动一个新的环境 xx。如果本地未部署,openclaw.json 以及插件需要自行配置。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| mkdir -p /opt/docker/openclaw-docker-user/xx cp /opt/docker/openclaw/docker-compose.yml /opt/docker/openclaw-docker-user/xx/docker-compose.yml cp /opt/docker/openclaw/.env /opt/docker/openclaw-docker-user/xx/.env.xx vi /opt/docker/openclaw-docker-user/xx/.env.xx
mkdir ~/.openclaw-xx cp ~/.openclaw/openclaw.json ~/.openclaw-openclaw-xx/openclaw.json cp -r ~/.openclaw/workspace/skills ~/.openclaw-openclaw-xx/workspace cp -r ~/.openclaw/extensions/feishu ~/.openclaw-openclaw-xx/extensions chown -R 1000:1000 ~/.openclaw-xx cd /opt/docker/openclaw-docker-user/xx
docker compose --env-file .env.xx run --rm openclaw-cli onboard docker compose --env-file .env.xx up -d
docker compose --env-file .env.xx exec openclaw-gateway openclaw devices list docker compose --env-file .env.xx exec openclaw-gateway openclaw devices approve <request-id>
|
升级 Docker 部署版本
1 2 3 4 5 6 7 8 9 10 11
| cd /opt/docker/openclaw git fetch --tags
git checkout -f -b v2026.3.13-1 v2026.3.13-1
docker build --pull --no-cache -t openclaw:local -f Dockerfile .
cd /opt/docker/openclaw-docker-user/xx docker compose --env-file .env.xx down docker compose --env-file .env.xx up -d
|