{"action":"opened","issue":{"url":"https://api.github.com/repos/docker/docker/issues/25728","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/25728/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/25728/comments","events_url":"https://api.github.com/repos/docker/docker/issues/25728/events","html_url":"https://github.com/docker/docker/issues/25728","id":171238729,"number":25728,"title":"[Proposal] Add a \"last build time\" field to image \"metadata\"","user":{"login":"dnephin","id":442180,"avatar_url":"https://avatars.githubusercontent.com/u/442180?v=3","gravatar_id":"","url":"https://api.github.com/users/dnephin","html_url":"https://github.com/dnephin","followers_url":"https://api.github.com/users/dnephin/followers","following_url":"https://api.github.com/users/dnephin/following{/other_user}","gists_url":"https://api.github.com/users/dnephin/gists{/gist_id}","starred_url":"https://api.github.com/users/dnephin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnephin/subscriptions","organizations_url":"https://api.github.com/users/dnephin/orgs","repos_url":"https://api.github.com/users/dnephin/repos","events_url":"https://api.github.com/users/dnephin/events{/privacy}","received_events_url":"https://api.github.com/users/dnephin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-15T19:07:30Z","updated_at":"2016-08-15T19:07:30Z","closed_at":null,"body":"When an image is built for the first time, the `Created` time is set.  If another build is performed, and the context hasn't changed, the result of the build will be a no-op. The old image will be used, and the `Created` time wont change.\r\n\r\nNormally this is fine, but there are some cases when it is valuable to know the time the last build was performed, not just when the original cached image was created.\r\n\r\nThe use case that I've encountered is creating a build automation tool that uses docker ([dobi](https://github.com/dnephin/dobi)). Using `make` to build images would have the same problem. Repeating the build (and hitting the cache) is fine for the \"build image\" step of the automation, but if there are steps that depend on the \"build image\" step, there is no way to determine if the dependency is stale or not.\r\n\r\nIf there was a field that stored the latest \"build\" time, that time could be compared against the modified time of files in the context, to determine if the build step is stale.\r\n\r\nRelated to #4237 in that it's mutable metadata that would not be sent to the registry. It would stay local to the daemon."}}
{"actor":{"display_login":"dnephin"}}