Differences between CMD and ENTRYPOINT with example.

Can be overriddenCannot be overridden
Cannot append additional paramsCan be appended
Command to run when container starts or arg to ENTRYPOINT if specifiedAlways first command to run when container starts
Multiple times can be added in the dockerfile but the last line will override the previousSame behavior as CMD
Treated as additional param when it is used along with ENTRYPOINTAlways the main command
Facebook Notice for EU! You need to login to view and post FB Comments!