nerdexam
Cisco

200-901 · Question #455

A development team needs to containerize an application named 'custapp4o3p2r6d3s6w7x6t9'. A Dockerfile has been created and now the docker build command must be run using the current folder to find th

The correct answer is D. docker build -t custapp4d5c-repo -f Dockerfile. The -t flag is used to specify the name (and optionally a tag) of the image. The -f flag is used to specify the location of the Dockerfile. The . at the end represents the build context, which is the current directory.

Application Deployment and Security

Question

A development team needs to containerize an application named 'custapp4o3p2r6d3s6w7x6t9'. A Dockerfile has been created and now the docker build command must be run using the current folder to find the Dockerfile, build the image and create a local repository named 'custapp4d5c- repo' that points to that image. Which command must be used?

Options

  • Adocker build custapp4d5c-repo Dockerfile
  • Bdocker build -t acustapp4d5c-repo Dockerfile.txt
  • Cdocker build custapp4d5c-repo -f Dockerfile.txt
  • Ddocker build -t custapp4d5c-repo -f Dockerfile

How the community answered

(18 responses)
  • B
    6% (1)
  • C
    6% (1)
  • D
    89% (16)

Explanation

The -t flag is used to specify the name (and optionally a tag) of the image. The -f flag is used to specify the location of the Dockerfile. The . at the end represents the build context, which is the current directory.

Topics

#Docker#Containerization#Image Building#Dockerfile

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice