Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view complete error message from 'docker stack ps'?

Tags:

docker

While following the docker tutorial, I ran into a problem while deploying a stack with the docker stack deploy command. The most information on the error I managed to obtain was from running the docker stack ps command, which displays a table with an Error column: docker stack ps output

This is not a lot of information, even the message is truncated to fit in the table. I have already resolved the original problem but for the future I would like to know: how can I view the complete error message? How would I go about reading the logs?

like image 719
kamilk Avatar asked Mar 25 '18 18:03

kamilk


People also ask

What does the docker stack ps command do?

When using the --format option, the stack ps command will either output the data exactly as the template declares or, when using the table directive, includes column headers as well.

What is docker Service ps?

This is a cluster management command, and must be executed on a swarm manager node. To learn about managers and workers, refer to the Swarm mode section in the documentation. For example uses of this command, refer to the examples section below.

What is docker ps status?

The 'docker ps' is a Docker command to list the running containers by default; however, we can use different flags to get the list of other containers that are in stopped or exited status. We can also manipulate the output as per our requirement using flags.


1 Answers

You need to use below command for the same

docker stack ps --no-trunc 

You can also find this in the command help by running the --help flag:

$ docker stack ps --help  Usage:  docker stack ps [OPTIONS] STACK  List the tasks in the stack  Options:   -f, --filter filter   Filter output based on conditions provided       --format string   Pretty-print tasks using a Go template       --no-resolve      Do not map IDs to Names       --no-trunc        Do not truncate output   -q, --quiet           Only display task IDs 
like image 90
Tarun Lalwani Avatar answered Oct 25 '22 19:10

Tarun Lalwani