fix(compose): make .azure and .config/gh mounts writable

az CLI crashes trying to write session cache to /root/.azure with :ro.
gh CLI has similar need. Mount them read-write (the host's Azure/gh
login state is intended to be shared, and the CLI's writes are cache/
session tokens going into the normal location).
This commit is contained in:
gongzhiyong
2026-04-24 22:23:18 +08:00
parent e5e5f939ee
commit 2dd513f036
+3 -2
View File
@@ -41,8 +41,9 @@ services:
- pnpm-store:/root/.local/share/pnpm/store
- bun-cache:/root/.bun/install/cache
- ${HOME}/.ssh:/root/.ssh:ro
- ${HOME}/.azure:/root/.azure:ro
- ${HOME}/.config/gh:/root/.config/gh:ro
# az CLI / gh CLI 需要写 session cache,不能用 :ro
- ${HOME}/.azure:/root/.azure
- ${HOME}/.config/gh:/root/.config/gh
# 注意:不要挂载 ~/.gitconfig —— 若宿主机没这个文件,Docker 会
# 把它自动创建为「空目录」,导致 git 报错。用上面 GIT_AUTHOR_*
# 环境变量就足够了。