January 2018
Intermediate to advanced
414 pages
10h 29m
English
If we want to get the logs for our instances, we can use the following command:
docker service logs hello-service
Or if we want to follow the log, like a tail command will, we can do the following instead:
docker service logs -f hello-service
Either way, in our logs, we will see something like:
hello-service.3.sqmo44zoaqnc@moby ...hello-service.2.enhf89re1kz9@moby ...hello-service.2.enhf89re1kz9@moby ...hello-service.1.suqe3o61n38e@moby ...hello-service.2.enhf89re1kz9@moby ...hello-service.2.enhf89re1kz9@moby ...hello-service.2.enhf89re1kz9@moby ...hello-service.2.enhf89re1kz9@moby ...hello-service.2.enhf89re1kz9@moby ...
The beginning of each log line indicates the instance where it is coming from. That first ...
Read now
Unlock full access