Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Build Timestamp #266

Closed
Virsacer opened this issue Sep 7, 2024 · 3 comments
Closed

Build Timestamp #266

Virsacer opened this issue Sep 7, 2024 · 3 comments

Comments

@Virsacer
Copy link

Virsacer commented Sep 7, 2024

Hi,
I pulled the new image

image

but Docker inspect shows, that this image is almost 2 month old:

root@DOCKER ~ $ docker inspect httpd:2.4-alpine | grep -E 'httpd@sha256|Created'
            "httpd@sha256:1126743b13846fe049683762a8fccfbd4a3966040eb5ff38c785eceebf0fcce6"
        "Created": "2024-07-17T23:31:14Z",
root@DOCKER ~ $
@tianon
Copy link
Member

tianon commented Sep 9, 2024

We set SOURCE_DATE_EPOCH (buildkit docs) while building -- if you want to see the date the build was performed, you'll want to look at the org.opencontainers.image.created annotation we add in the image index (relevant code) instead: https://oci.dag.dev/?image=httpd:2.4-alpine ("org.opencontainers.image.created": "2024-09-06T23:20:57Z").

@Virsacer
Copy link
Author

Virsacer commented Sep 9, 2024

Thanks for the explanation
I was confused by the fact, that docker images listed both the freshly downloaded and the previous image with CREATED "7 weeks ago"

@tianon
Copy link
Member

tianon commented Sep 9, 2024

Indeed, it's unfortunate -- I wish we could somehow have Docker show when we built it and still have the possibility of a reproducible build in the future. 😞

Glad that answers your question!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants