ENTRYPOINT vs CMD Explained
What ENTRYPOINT vs CMD does, with an example.
Published November 9, 2026
ENTRYPOINT vs CMD both define what runs when a container starts, but ENTRYPOINT sets the fixed executable while CMD supplies default arguments that can be overridden.
Key points
- Part of the standard Docker CLI used for building, running, and managing containers
Example
ENTRYPOINT ["node"]
CMD ["index.js"]