While preparing a release, a developer needs to build an image using /opt/dockerfiles/app/Dockerfile and tag it as example/app:v1.2. Which docker build command uses the correct Dockerfile, context, tag, and parameters?
The valid command supplies both -f and -t options before the context directory and matches the required tag example/app:v1.2. A distractor uses the wrong version tag, another tries the non-existent -T flag, and one places the context path first, so Docker interprets the remaining tokens as stray arguments and fails.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the Docker build context?
Open an interactive chat with Bash
What is the difference between the -t and -f flags in the `docker build` command?
Open an interactive chat with Bash
Why is the -T flag not valid in the `docker build` command?