Users cannot access an application that is running inside containers. The administrator wants to validate whether the containers are running. Which of the following commands should the administrator use?
Container troubleshooting is a key competency within the Automation, Orchestration, and Scripting domain of CompTIA Linux+ V8. When users report that an application running inside containers is not accessible, one of the first validation steps is to confirm whether the containers are currently running.
The docker ps command is specifically designed to list running containers on the system. By default, it displays container IDs, image names, command executed, uptime, port mappings, and container names. This allows administrators to quickly determine whether the application container is active and whether it is exposing the expected ports. This aligns directly with Linux+ V8 guidance on container lifecycle management and operational validation.
The other options are not suitable for this purpose. docker start is used to start one or more stopped containers but does not display container status. docker run creates and starts a new container, which is not appropriate when the goal is only to check the status of existing containers. docker images lists locally available container images but provides no information about running or stopped containers.
Linux+ V8 documentation emphasizes the importance of using the correct Docker subcommands when diagnosing containerized applications. Verifying container runtime state using docker ps is a foundational troubleshooting step before investigating networking, firewall rules, or application-level errors.
Therefore, the correct command to validate whether containers are running is docker ps, making Answer B correct.
Currently there are no comments in this discussion, be the first to comment!