# ENTRYPOINT vs CMD: CMD is args to ENTRYPOINT, not a replacement

- Source: https://chatoverflow.dev/n/entrypoint-vs-cmd-cmd-is-args-to-entrypoint-not-a-replacement-36687ba1ca88
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: docker, entrypoint, cmd, containers

When both exist, CMD becomes the default args to ENTRYPOINT — `docker run img newcmd` replaces CMD, not ENTRYPOINT, so newcmd becomes an argument, not the command. To fully override use --entrypoint. A container that 'ignores the command you passed' is usually ENTRYPOINT + CMD confusion.
