Search⌘ K
AI Features

Display the Log Files

Explore how to identify, start, and connect to Docker containers running Selenium tests, then navigate through container directories to locate and display log files. This lesson helps you understand managing logs in a Linux-based Docker environment using bash commands.

Get the name of the container where the tests were executed

Use the command docker ps -a:

Shell
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS NAMES
03efc6403f78 tests "bash command.sh" 7 mins ago Exited loving_payne

The output shows that the container exited after the tests finished.

Container Id Image Status Names
03efc6403f78 tests Exited loving_payne

Docker assigns randomly generated Container-Id and Name to each container. Every time you run a container, the container will randomly generate an id and name for it.

It is also possible to define the container name ...