Check Logs of Container In Docker

If you require to check docker logs of the container, so you can see docker container log files and also configure docker logs location. you can also define the logs file location in the docker file where you need to give a path to store the logs and later you can easily find out the error if any comes.

Check Out: How To Install Winscp Open source Software In Ubuntu 18.04

So I have some docker images and I have created a container using Apache image. you can also create a file for analyzing these. Docker container is easy to create and use. you can also mount NFS to run with a docker container where your data will be saved in this drive.  

docker images

docker logs empty

Check Out: How To Provide Private Subnets Servers To Internet Access

Create Apache Container

docker run -it –name apache e06c3dbbfe23 /bin/bash

Check Container created

Check Out: Rename Docker Container

docker ps

 docker log check

you can do some task here and check whether you’re getting logs.

docker exec -it apache /bin/bash

Check Out: Step To Install Docker CE (Community Edition) On CentOS 7

Check logs here

docker container logs apache

YouTube Link: Check logs

That’s it. docker container log files configure docker logs docker logs location

Leave a Reply

avatar
  Subscribe  
Notify of