{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/1996","labels_url":"https://api.github.com/repos/docker/docker/issues/1996/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/1996/comments","events_url":"https://api.github.com/repos/docker/docker/issues/1996/events","html_url":"https://github.com/docker/docker/issues/1996","id":20003240,"number":1996,"title":"New feature request: Selectively disable caching for specific RUN commands in Dockerfile","user":{"login":"mohanraj-r","id":1509984,"avatar_url":"https://avatars.githubusercontent.com/u/1509984?v=3","gravatar_id":"","url":"https://api.github.com/users/mohanraj-r","html_url":"https://github.com/mohanraj-r","followers_url":"https://api.github.com/users/mohanraj-r/followers","following_url":"https://api.github.com/users/mohanraj-r/following{/other_user}","gists_url":"https://api.github.com/users/mohanraj-r/gists{/gist_id}","starred_url":"https://api.github.com/users/mohanraj-r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohanraj-r/subscriptions","organizations_url":"https://api.github.com/users/mohanraj-r/orgs","repos_url":"https://api.github.com/users/mohanraj-r/repos","events_url":"https://api.github.com/users/mohanraj-r/events{/privacy}","received_events_url":"https://api.github.com/users/mohanraj-r/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels//tools/build","name":"/tools/build","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":75,"created_at":"2013-09-24T20:18:45Z","updated_at":"2015-01-29T18:56:29Z","closed_at":null,"body":"branching off the discussion from #1384 :\r\n\r\nI understand -no-cache will disable caching for the entire Dockerfile. But would be useful if I can disable cache for a specific RUN command? For example updating repos or downloading a remote file .. etc. From my understanding that right now RUN apt-get update if cached wouldn't actually update the repo? This will cause the results to be different than from a VM?\r\n\r\nIf disable caching for specific commands in the Dockerfile is made possible, would the subsequent commands in the file then not use the cache? Or would they do something a bit more intelligent - e.g. use cache if the previous command produced same results (fs layer) when compared to a previous run?\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/72082209","html_url":"https://github.com/docker/docker/issues/1996#issuecomment-72082209","issue_url":"https://api.github.com/repos/docker/docker/issues/1996","id":72082209,"user":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T18:56:29Z","updated_at":"2015-01-29T18:56:29Z","body":"> But I predict --options are going to happen regardless.\r\n\r\nNothing is decided yet, on the contrary; the syntax @duglin is suggesting is a *counter proposal* to a syntax that was proposed/decided on earlier. Please read #9934 for more information on that.\r\n\r\nAlso, @duglin is *not* the person making that decision (at least, not alone). Some of the points you're raising have been mentioned in the other thread.\r\n\r\nI share your concern about readability, but also think the other syntaxes that were proposed could have the same problem if multiple options have to be specified.\r\n\r\nThis problem can possibly be overcome by formatting the Dockerfile for readability. I think it would be good to write some more examples to test/check if readability is a concern when properly formatted.\r\n\r\nAnd, yes, your input is welcome on that."}}