• +91 9723535972
  • info@interviewmaterial.com

Docker Interview Questions and Answers

Related Subjects

Question - Explain CMD and ENTRYPOINT in a Dockerfile?

Answer -

In a Dockerfile, both CMD and ENTRYPOINT instructions define which command will be executed while running a container. For their cooperation, there are some rules, such as:

  • The Dockerfile should specify at least one command from CMD or ENTRYPOINT
  • While using the container as an executable, ENTRYPOINT needs to be defined
  • When running the container with an alternative argument, CMD will be overridden

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners