KCNA · Question #64
What is a Dockerfile?
The correct answer is C. A text file that contains all the commands a user could call on the command line to assemble an. A Dockerfile is a plain text file that specifies a set of instructions used by the Docker engine to automatically build a Docker image.
Question
What is a Dockerfile?
Options
- AA bash script that is used to automatically build a docker image.
- BA config file that defines which image registry a container should be pushed to.
- CA text file that contains all the commands a user could call on the command line to assemble an
- DAn image layer created by a running container stored on the host.
How the community answered
(41 responses)- A5% (2)
- C93% (38)
- D2% (1)
Why each option
A Dockerfile is a plain text file that specifies a set of instructions used by the Docker engine to automatically build a Docker image.
While a Dockerfile defines steps for building, it is not a bash script; it uses its own specific syntax and commands like FROM, RUN, COPY, and CMD.
A Dockerfile does not define the image registry; that is typically specified during the `docker push` command or configured in Docker daemon settings.
A Dockerfile is a text file containing a series of instructions, each representing a command that Docker executes in order to build a new image. These instructions define the base image, environment variables, commands to run, files to copy, and ports to expose, among other things.
An image layer created by a running container stored on the host is part of the container's filesystem changes, not the Dockerfile itself, which defines how an image is built.
Concept tested: Dockerfile definition and purpose
Source: https://docs.docker.com/engine/reference/builder/
Topics
Community Discussion
No community discussion yet for this question.