6. What is the difference between CMD vs Entrypoint

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

CMD is an instruction given in the dockerfile which is executed in the container when the image is run. When two CMD instructions are given in the dockerfile, the latest one is executed.

Entrypoint is similar to CMD except that when more instructions are given all are appended.   

Dockerfile should specify at least any one of the CMD or Entrypoint commands.

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x