November 2017
Intermediate to advanced
298 pages
7h 10m
English
Often in general work with containers, you will likely have to figure out what is going on with a container that is running, but docker ps is not good enough to provide you with all the information you need to figure things out. For these cases, the first command to use is docker logs. This command displays any output that the container has emitted, including both stdout and stderr streams. For the following logs, I started the same NGINX container from before and accessed its hosted page on localhost:
$ docker run -d \ -p 8080:80 \ nginx06ebb46f64817329d360bb897bda824f932b9bcf380ed871709c2033af069118$ # Access the page http://localhost:8080 with your browser$ docker logs 06ebb46f172.17.0.1 - - [02/Aug/2017:01:39:51 +0000] ...
Read now
Unlock full access