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

Fixes wrong timestamp calculation #5988

Merged
merged 1 commit into from Nov 1, 2022

Conversation

leblonk
Copy link
Contributor

@leblonk leblonk commented Oct 12, 2022

As already noted in #4275

The docker api returns the created date in epoch seconds, not in epoch millis. This caused the max age pull policy to always pull the image, as the calculated date ended up in the 1970ies. This fixes that by parsing the date as seconds, rather than millis.
See documentation here: https://docs.docker.com/engine/api/v1.41/#tag/Image/operation/ImageList

Created | required | integerDate and time at which the image was created as a Unix timestamp (number of seconds sinds EPOCH).
-- | --

@leblonk leblonk requested a review from a team as a code owner October 12, 2022 20:25
@leblonk
Copy link
Contributor Author

leblonk commented Oct 13, 2022

@kiview

@eddumelendez eddumelendez added this to the next milestone Nov 1, 2022
@eddumelendez eddumelendez merged commit 7dead16 into testcontainers:main Nov 1, 2022
@eddumelendez
Copy link
Member

@leblonk sorry for the delay and thanks for the contribution! This is now in main branch

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

Successfully merging this pull request may close these issues.

None yet

2 participants