-
Notifications
You must be signed in to change notification settings - Fork 18.8k
c8d: show the real image creation date when listing images #46719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
daemon/containerd/image_list.go
Outdated
|
|
||
| created := int64(0) | ||
| if cfg.Created != nil { | ||
| created = cfg.Created.Unix() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Micro-nit; as we already have a summary var in which we store the image-data, I guess we can avoid the created var if we put this block after it;
if cfg.Created != nil {
summary.Created = cfg.Created.Unix()
}Would there be a need to do && !cfg.Created.IsZero() as well? (not sure)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to set the Created in the IsZero case, that's actually what the GD case does
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huhu, want me to change this one too while I'm at it?
moby/daemon/images/image_list.go
Lines 257 to 260 in dcc8020
| if image.Created != nil { | |
| created = image.Created.Unix() | |
| } | |
| summary := &imagetypes.Summary{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! We can; but that's fine for a separate PR, as that's not a new change, right?
My comment was mostly; if we want to; let's do so before merging, to reduce (ever so little) code churn 👍
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
37ef049 to
8f756fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

- What I did
Used the creation date of the imge from the config and not from the containerd metadata,
Also set the
ParentIDto whatever we find in the image labels- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)