1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 06:28:42 +01:00

fix: fixes panic in agent with stopped containers (#3167)

This commit is contained in:
Amir Raminfar
2024-07-30 19:31:14 -07:00
committed by GitHub
parent b4277603cf
commit 657643e6ce
7 changed files with 45 additions and 76 deletions

View File

@@ -405,13 +405,11 @@ func newContainerFromJSON(c types.ContainerJSON, host string) Container {
}
if startedAt, err := time.Parse(time.RFC3339Nano, c.State.StartedAt); err == nil {
utc := startedAt.UTC()
container.StartedAt = &utc
container.StartedAt = startedAt.UTC()
}
if createdAt, err := time.Parse(time.RFC3339Nano, c.Created); err == nil {
utc := createdAt.UTC()
container.Created = utc
container.Created = createdAt.UTC()
}
if c.State.Health != nil {