From 2dd513f036560ef066b903a230977c79261b43e7 Mon Sep 17 00:00:00 2001 From: gongzhiyong Date: Fri, 24 Apr 2026 22:23:18 +0800 Subject: [PATCH] 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). --- docker-compose.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3edd45e..7c92900 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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_* # 环境变量就足够了。