3.2 Given a scenario, perform basic container operations.
Objective 3.2 sits in Scripting, Containers, and Automation, which carries 19% of the Linux+ exam. The questions below are original, written from the official objective title above, and each explanation cites the CompTIA page it rests on.
Objective title verbatim from the official objectives. CompTIA exam page ↗
A worked example
Shown solved, with the whole explanation open: this is what every question here carries.
An administrator starts an nginx container that must keep running in the background and return the shell prompt at once. Which docker run flag does that?
Correct.
Concept
A container can run attached to the terminal or in the background, and a run flag selects which, freeing the shell for other work.
Why C
-d (--detach) runs the container in the background and prints its ID, returning the prompt immediately.
Now you: objective 3.2 questions
No account needed. The explanation opens when you answer.
Sample question 1 of 3
An administrator finds a running app unreachable although its Dockerfile declares EXPOSE 8080. What is actually required to reach it from the host?
Sample question 2 of 3
An administrator sees a database container lose all its data whenever it is recreated. Which docker run option keeps the data on the host across restarts?
Sample question 3 of 3
Which docker run flag automatically removes a container and its anonymous volumes when it exits?
Full Linux+ question bank coming
We’re writing the complete bank from the official objectives right now. Leave your email and we’ll tell you when it ships, nothing else, ever.
Read the sources
These are the official pages the questions above cite. Reading them is studying the objective from the primary source, which is what the explanations point you toward anyway.