What is the difference between CMD and ENTRYPOINT in a Dockerfile

0 votes

CMD and ENTRYPOINT are two commands in Dockerfiles that look identical to me. But I assume there is a (minor?) difference between them; otherwise, having two instructions for the same thing would be redundant.

The CMD documentation

The main purpose of a CMD is to provide defaults for an executing container.

The ENTRYPOINT documentation

An ENTRYPOINT helps you to configure a container that you can run as an executable.

So, what's the difference between the two then?

Apr 30, 2022 in Docker by Abhijeet
• 180 points

edited 4 days ago 9 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP