Skip to content
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

Proper age for images #1

Open
efrecon opened this issue Nov 7, 2019 · 0 comments
Open

Proper age for images #1

efrecon opened this issue Nov 7, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@efrecon
Copy link
Contributor

efrecon commented Nov 7, 2019

Currently, the utility uses the image creation date, coming from the JSON response from docker image inspect to guess the age of an image. This is how old the image is, but not has little to do with when it was first put into action on the local system and started to be used by some container.

Instead, the age should be computed as to when the image was first put onto the local file system. Given an image SHA256 (or short) ID, e.g. sha256:a39fffbbe2d0346fa54587a1cf7273599cb519187ca24516d7e4e85acab72d5e or a39fffbbe2d0, the date can be found at the file with the same name as the SHA256, without the leading sha256: string, in the directory that contains the database of images, e.g. /var/lib/docker/image/aufs/imagedb/content/sha256. Where this content really is has with the local installation of docker. But docker info is able to return back the root directory of the storage driver, e.g. /var/lib/docker/aufs. However, this will vary depending on the configuration and the underlying filesystem.

@efrecon efrecon added the enhancement New feature or request label Nov 7, 2019
@efrecon efrecon self-assigned this Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant