6. What is the difference between CMD vs Entrypoint

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
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x