fix(docker): Codex CLI 挂载路径可覆盖 + 版本号单点维护

- docker-compose: ${HOME}/.codex 改为 ${CODEX_HOME_HOST:-${HOME}/.codex},
  修复 Windows PowerShell/CMD 下 HOME 未设置导致挂载失败
- Dockerfile: codex-builder 阶段 ARG CODEX_CLI_VERSION 去掉重复默认值,
  统一从顶层 ARG 继承(0.144.3 现仅出现一处)
- README: 补充 Windows 用户 CODEX_HOME_HOST 配置说明
This commit is contained in:
shy3130
2026-07-14 18:12:48 +08:00
parent 644cf8648d
commit 8efc96d576
3 changed files with 10 additions and 2 deletions
+2 -1
View File
@@ -52,7 +52,8 @@ RUN if [ "$INCLUDE_STOCKSDK" = "1" ]; then \
FROM node:20-bookworm-slim AS codex-builder
ARG USE_CN_MIRROR=1
ARG NPM_REGISTRY=https://registry.npmmirror.com
ARG CODEX_CLI_VERSION=0.144.3
# 版本由顶层 ARG CODEX_CLI_VERSION 提供, 这里仅声明以继承, 不再重复默认值。
ARG CODEX_CLI_VERSION
RUN if [ "$USE_CN_MIRROR" = "1" ]; then npm config set registry "$NPM_REGISTRY"; fi \
&& npm install --global --prefix /opt/codex "@openai/codex@${CODEX_CLI_VERSION}" \
&& CODEX_NATIVE="$(find /opt/codex -type f -path '*/vendor/*/bin/codex' -print -quit)" \