Add fix from #275 for uptime of running containers

This commit is contained in:
Florian 2022-02-01 00:26:08 +01:00
parent f83e73d1ea
commit 05b17798f8
1 changed files with 1 additions and 1 deletions

View File

@ -209,7 +209,7 @@ func (cm *Docker) inspect(id string) (insp *api.Container, found bool, failed bo
func calcUptime(insp *api.Container) string {
endTime := insp.State.FinishedAt
if endTime.IsZero() {
if endTime.IsZero() || insp.State.Running {
endTime = time.Now()
}
uptime := endTime.Sub(insp.State.StartedAt)