View log of Docker container
Today I tried to start a container and only got the container ID as output:
$ docker run ...
a0a55f02da5d5b1f6112c791bfff1da1b51c7b60b38b1bae57d5d9b6378d51f9
The container is not running.
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Turns out this means it died, since the container exited and logged its ID as output.
To view the logs of this container, use the docker logs
command:
docker logs a0a55f02da5d5b1f6112c791bfff1da1b51c7b60b38b1bae57d5d9b6378d51f9