Differences between CMD and ENTRYPOINT with example.

DevOps

MOTOSHARE 🚗🏍️
Turning Idle Vehicles into Shared Rides & Earnings

From Idle to Income. From Parked to Purpose.
Earn by Sharing, Ride by Renting.
Where Owners Earn, Riders Move.
Owners Earn. Riders Move. Motoshare Connects.

With Motoshare, every parked vehicle finds a purpose. Owners earn. Renters ride.
🚀 Everyone wins.

Start Your Journey with Motoshare
CMDENTRYPOINT
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