Browse Source

add time since exit in docker ps

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Victor Vieux 11 năm trước cách đây
mục cha
commit
15a267b57d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      runtime/state.go

+ 1 - 1
runtime/state.go

@@ -28,7 +28,7 @@ func (s *State) String() string {
 		}
 		return fmt.Sprintf("Up %s", utils.HumanDuration(time.Now().UTC().Sub(s.StartedAt)))
 	}
-	return fmt.Sprintf("Exit %d", s.ExitCode)
+	return fmt.Sprintf("Exited (%d) %s ago", s.ExitCode, utils.HumanDuration(time.Now().UTC().Sub(s.FinishedAt)))
 }
 
 func (s *State) IsRunning() bool {