August 2018
Intermediate to advanced
352 pages
12h 30m
English
To get logs from the container, run the following command:
docker container logs [OPTIONS] CONTAINER
Or run the following legacy command:
docker logs [OPTIONS] CONTAINER
Let's take an example from the earlier section where we ran a daemonized container and looked at the logs:
$ docker container run -d ubuntu \
/bin/bash -c \
"while [ true ]; do date; sleep 1; done"

Read now
Unlock full access