March 2017
Beginner to intermediate
925 pages
18h 11m
English
If the container emits logs or output on STDOUT/STDERR, then we can get them without logging into the container.
Make sure the Docker daemon is running on the host and you can connect through the Docker client. You will also need a running container, which emits logs/output on STDOUT.
docker logs [-f|--follow[=false]][-t|--timestamps[=false]] CONTAINER
$ docker run -d fedora /bin/bash -c "while [ 1 ]; do echo hello docker ; sleep 1; done"
Docker will look at the container's specific log file from /var/lib/docker/containers/<Container ...
Read now
Unlock full access