Make docker-entrypoint pass through command args
The node:24 base image sets ENTRYPOINT ["docker-entrypoint.sh"]. We override that script but the ENTRYPOINT still runs on every start, so compose's `command:` was being handed to our script as args (and silently ignored — we always exec'd `node dist/main.js`). That made the `sleep infinity` override useless: the crash-looping app kept running. Fix by execing "$@" when args are present so compose overrides work, and set CMD to ["node","dist/main.js"] so normal (no-override) starts still boot the app.
This commit is contained in:
@@ -19,4 +19,7 @@ ENV NODE_ENV=production \
|
||||
PI_CODING_AGENT_DIR=/pi-agent
|
||||
VOLUME ["/workspace", "/pi-agent"]
|
||||
|
||||
CMD ["/usr/local/bin/docker-entrypoint.sh"]
|
||||
# The node base image already sets ENTRYPOINT ["docker-entrypoint.sh"], and we replaced that
|
||||
# script above at /usr/local/bin/docker-entrypoint.sh — so ours runs on every container start.
|
||||
# Keep CMD as the app command so compose overrides (command: ["sleep","infinity"], ...) work.
|
||||
CMD ["node", "dist/main.js"]
|
||||
|
||||
Reference in New Issue
Block a user