A Linux administrator wants to run a container that stops automatically after the main process exits. Which Docker run flag should be used?
Correct. --rm removes the container once it stops.
Why this answer
The --rm flag automatically removes the container when it exits, which is appropriate when the container should stop and be cleaned up after its main process finishes.