diff --git a/provider/docker.go b/provider/docker.go index 4d15c4faa..408e21b0a 100644 --- a/provider/docker.go +++ b/provider/docker.go @@ -828,6 +828,9 @@ func listTasks(ctx context.Context, dockerClient client.APIClient, serviceID str var dockerDataList []dockerData for _, task := range taskList { + if task.Status.State != swarm.TaskStateRunning { + continue + } dockerData := parseTasks(task, serviceDockerData, networkMap, isGlobalSvc) dockerDataList = append(dockerDataList, dockerData) }