dotnet / Docker.DotNet

:whale: .NET (C#) Client Library for Docker API
https://www.nuget.org/packages/Docker.DotNet/
MIT License
2.23k stars 381 forks source link

[Question] equivalent api for docker service ps --no-trunc [swarm service name] #656

Open dazinator opened 11 months ago

dazinator commented 11 months ago

I am wondering if there is an api to get the equivalent to docker service ps --no-trunc servicename

I have tried to explore the api surface but can't see an obvious match.

HofmeisterAn commented 11 months ago

Doesn't ListServicesAsync(ServicesListParameters, CancellationToken) respectively InspectServiceAsync(string, CancellationToken) return the service information?

dazinator commented 11 months ago

No from what I can see, docker service ps --no-trunc servicename returns different error information for example, when a service's tasks cannot be scheduled (are rejected) due to an error with an invalid bind mount specification the "error" given from docker service ps --no-trunc servicename is more helpful