Dockerfile: symlink codex into /usr/local/bin

The host's /usr/bin/codex is a symlink to the codex.js entrypoint inside
the package directory; bind-mounting it directly resolves to the file
content but breaks codex's import.meta.url-based module resolution. Add
the symlink at build time so a /usr/lib/node_modules/@openai/codex bind
mount is enough to make codex usable in the container.
This commit is contained in:
Semih
2026-05-09 10:14:29 +00:00
parent ec52ef8e29
commit ed2c23f8aa

View File

@@ -26,6 +26,8 @@ RUN pnpm build
RUN mkdir -p /project && chown -R node:node /project /app RUN mkdir -p /project && chown -R node:node /project /app
RUN ln -s /usr/lib/node_modules/@openai/codex/bin/codex.js /usr/local/bin/codex
USER node USER node
WORKDIR /project WORKDIR /project