{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/12169","labels_url":"https://api.github.com/repos/docker/docker/issues/12169/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/12169/comments","events_url":"https://api.github.com/repos/docker/docker/issues/12169/events","html_url":"https://github.com/docker/docker/issues/12169","id":67039285,"number":12169,"title":"Add ability to ```ADD`` files and then remove them in the same layer in a Dockerfile","user":{"login":"mingfang","id":821695,"avatar_url":"https://avatars.githubusercontent.com/u/821695?v=3","gravatar_id":"","url":"https://api.github.com/users/mingfang","html_url":"https://github.com/mingfang","followers_url":"https://api.github.com/users/mingfang/followers","following_url":"https://api.github.com/users/mingfang/following{/other_user}","gists_url":"https://api.github.com/users/mingfang/gists{/gist_id}","starred_url":"https://api.github.com/users/mingfang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mingfang/subscriptions","organizations_url":"https://api.github.com/users/mingfang/orgs","repos_url":"https://api.github.com/users/mingfang/repos","events_url":"https://api.github.com/users/mingfang/events{/privacy}","received_events_url":"https://api.github.com/users/mingfang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels//tools/build","name":"/tools/build","color":"0052cc"},{"url":"https://api.github.com/repos/docker/docker/labels/kind/feature","name":"kind/feature","color":"AAB3AB"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-08T03:19:41Z","updated_at":"2015-04-13T04:32:15Z","closed_at":null,"body":"A common use case when writing Dockerfiles is to ```ADD``` source code then followed by compiling and then packaging the application.  Currently the ```ADD``` results in its own layer, without the ability to remove it.  \r\nIdeally I would be able to do this in a Dockerfile\r\n```\r\nADD src /src && \\\r\n        cd /src && \\\r\n        make install && \\\r\n        rm -rf /src\r\n```\r\n\r\nThis way the ```src``` will never end up in a layer."},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/92204708","html_url":"https://github.com/docker/docker/issues/12169#issuecomment-92204708","issue_url":"https://api.github.com/repos/docker/docker/issues/12169","id":92204708,"user":{"login":"mingfang","id":821695,"avatar_url":"https://avatars.githubusercontent.com/u/821695?v=3","gravatar_id":"","url":"https://api.github.com/users/mingfang","html_url":"https://github.com/mingfang","followers_url":"https://api.github.com/users/mingfang/followers","following_url":"https://api.github.com/users/mingfang/following{/other_user}","gists_url":"https://api.github.com/users/mingfang/gists{/gist_id}","starred_url":"https://api.github.com/users/mingfang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mingfang/subscriptions","organizations_url":"https://api.github.com/users/mingfang/orgs","repos_url":"https://api.github.com/users/mingfang/repos","events_url":"https://api.github.com/users/mingfang/events{/privacy}","received_events_url":"https://api.github.com/users/mingfang/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T04:32:15Z","updated_at":"2015-04-13T04:32:15Z","body":"That's a potential solution.\r\nMaybe a MOUNT command is even more to the point."}}