This assumes you have installed Docker on Linux, Docker is running, and that you have created a container. The docker logs command is used to view a containers logs. You may want to first issue the docker ps command to get the name of the containers.
The docker ps command can be used to determine if the container is running.
docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d937372c09ab9 b939aa938add9913 "/docker-entrypoin..." 6 minutes ago Created my-container
In this example, the logs for the container named my-container will be displayed.
docker logs my-container
Often, the -t or --timestamps option is included.
docker logs --timestamps my-container