6. What is the difference between CMD vs Entrypoint

DevOps

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started 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