Question
You have a Windows Server container host named Server1.
You create a Dockerfile named df1.
You need to generate a container image by using df1.
Which command should you run?
- A. docker build Correct
- B. docker exec
- C. docker create
- D. docker images
Explanation
The command 'docker build' is used to generate a container image from a Dockerfile. The other commands listed do not serve this purpose: 'docker exec' runs a command in a running container, 'docker create' creates a new container but does not start it, and 'docker images' lists the available images.