...

/

Accessing Application Logs in Docker

Accessing Application Logs in Docker

Application logs from container

We'll cover the following...

Here, we will see how to access application logs from the container.

Container logs

When we run our app in Docker, we might need to access logs of the server. If your container is running in daemon mode or in the background, type docker ps to list all running containers.

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
64dcb356b5e4        flask_app:1.0       "flask run"         12 hours ago        Up 12 hours                             charming_solomon

Now, on the command line, type

docker logs ...