A developer must generate an image from the file at /opt/dockerfiles/app/Dockerfile and assign it the label example/app:v1.2. Which command accomplishes this with the proper build context and tag settings?
The successful invocation places both -f and -t flags before the context path and uses the exact tag example/app:v1.2. The second choice labels with a mismatched version. The third uses -T, which is not recognized for tagging. The fourth places options after the context, causing the build to treat the path as an unnamed context argument.
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 does the '-t' flag do in the Docker build command?
Open an interactive chat with Bash
Why is the order of flags and arguments important in the Docker build command?
Open an interactive chat with Bash
What is a Dockerfile and what role does it play in building images?