• +91 9723535972
  • info@interviewmaterial.com

DevOps Interview Questions and Answers

Question - What is the purpose of the expose and publish commands in Docker?

Answer -

Expose
  • Expose is an instruction used in Dockerfile.
  • It is used to expose ports within a Docker network.
  • It is a documenting instruction used at the time of building an image and running a container.
  • Expose is the command used in Docker.
  • Example: Expose 8080
Publish
  • Publish is used in a Docker run command.
  • It can be used outside a Docker environment.
  • It is used to map a host port to a running container port.
  • --publish or –p is the command used in Docker.
  • Example: docker run –d –p 0.0.0.80:80
  • Now, let's have a look at the DevOps interview questions for continuous monitoring.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners