Introduction
In this lab, you will learn how to effectively use the docker service ps
command to inspect and manage tasks within a Docker Swarm service. You will begin by listing the basic information of tasks associated with a service, understanding the key details provided in the default output.
Building upon the basic listing, you will then explore how to retrieve full details of service tasks using the --no-trunc
flag for comprehensive information. The lab will further guide you on filtering tasks based on various criteria such as name, the node they are running on, and their desired state, allowing you to pinpoint specific tasks. Finally, you will learn how to format the output of the docker service ps
command to customize the displayed information according to your needs.