mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-24 06:28:42 +01:00
feat: handles container exits better and uses the real time when container has exited (#3504)
This commit is contained in:
@@ -385,12 +385,16 @@ func newContainerFromJSON(c types.ContainerJSON, host string) Container {
|
||||
Tty: c.Config.Tty,
|
||||
}
|
||||
|
||||
if createdAt, err := time.Parse(time.RFC3339Nano, c.Created); err == nil {
|
||||
container.Created = createdAt.UTC()
|
||||
}
|
||||
|
||||
if startedAt, err := time.Parse(time.RFC3339Nano, c.State.StartedAt); err == nil {
|
||||
container.StartedAt = startedAt.UTC()
|
||||
}
|
||||
|
||||
if createdAt, err := time.Parse(time.RFC3339Nano, c.Created); err == nil {
|
||||
container.Created = createdAt.UTC()
|
||||
if stoppedAt, err := time.Parse(time.RFC3339Nano, c.State.FinishedAt); err == nil {
|
||||
container.FinishedAt = stoppedAt.UTC()
|
||||
}
|
||||
|
||||
if c.State.Health != nil {
|
||||
|
||||
Reference in New Issue
Block a user