{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/3639","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/3639/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/3639/comments","events_url":"https://api.github.com/repos/docker/docker/issues/3639/events","html_url":"https://github.com/docker/docker/issues/3639","id":25786644,"number":3639,"title":"Base Images & Volume & mkdir","user":{"login":"coderlol","id":6237996,"avatar_url":"https://avatars.githubusercontent.com/u/6237996?v=3","gravatar_id":"","url":"https://api.github.com/users/coderlol","html_url":"https://github.com/coderlol","followers_url":"https://api.github.com/users/coderlol/followers","following_url":"https://api.github.com/users/coderlol/following{/other_user}","gists_url":"https://api.github.com/users/coderlol/gists{/gist_id}","starred_url":"https://api.github.com/users/coderlol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coderlol/subscriptions","organizations_url":"https://api.github.com/users/coderlol/orgs","repos_url":"https://api.github.com/users/coderlol/repos","events_url":"https://api.github.com/users/coderlol/events{/privacy}","received_events_url":"https://api.github.com/users/coderlol/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/exp/expert","name":"exp/expert","color":"3B8686"},{"url":"https://api.github.com/repos/docker/docker/labels/kind/bug","name":"kind/bug","color":"FF8C94"}],"state":"open","locked":false,"assignee":{"login":"cpuguy83","id":799078,"avatar_url":"https://avatars.githubusercontent.com/u/799078?v=3","gravatar_id":"","url":"https://api.github.com/users/cpuguy83","html_url":"https://github.com/cpuguy83","followers_url":"https://api.github.com/users/cpuguy83/followers","following_url":"https://api.github.com/users/cpuguy83/following{/other_user}","gists_url":"https://api.github.com/users/cpuguy83/gists{/gist_id}","starred_url":"https://api.github.com/users/cpuguy83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpuguy83/subscriptions","organizations_url":"https://api.github.com/users/cpuguy83/orgs","repos_url":"https://api.github.com/users/cpuguy83/repos","events_url":"https://api.github.com/users/cpuguy83/events{/privacy}","received_events_url":"https://api.github.com/users/cpuguy83/received_events","type":"User","site_admin":false},"milestone":null,"comments":26,"created_at":"2014-01-17T04:21:06Z","updated_at":"2016-02-03T19:07:34Z","closed_at":null,"body":"If the base image Dockerfile has a  VOUME /var/lib directive, then an image derived from the base image cannot do a RUN mkdir -p /var/lib/somedir\r\n\r\nThe mkdir command has no effect. I think it is convenient to have the base image export a VOLUME and the derived images can create their own structure without having to explicitly calling their own VOLUME.\r\n\r\nAs-is, the base image must not issue the VOLUME /var/lib or the derived images won't be able to create a directory in /var/lib\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/179410049","html_url":"https://github.com/docker/docker/issues/3639#issuecomment-179410049","issue_url":"https://api.github.com/repos/docker/docker/issues/3639","id":179410049,"user":{"login":"simonvanderveldt","id":204286,"avatar_url":"https://avatars.githubusercontent.com/u/204286?v=3","gravatar_id":"","url":"https://api.github.com/users/simonvanderveldt","html_url":"https://github.com/simonvanderveldt","followers_url":"https://api.github.com/users/simonvanderveldt/followers","following_url":"https://api.github.com/users/simonvanderveldt/following{/other_user}","gists_url":"https://api.github.com/users/simonvanderveldt/gists{/gist_id}","starred_url":"https://api.github.com/users/simonvanderveldt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonvanderveldt/subscriptions","organizations_url":"https://api.github.com/users/simonvanderveldt/orgs","repos_url":"https://api.github.com/users/simonvanderveldt/repos","events_url":"https://api.github.com/users/simonvanderveldt/events{/privacy}","received_events_url":"https://api.github.com/users/simonvanderveldt/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T19:07:34Z","updated_at":"2016-02-03T19:07:34Z","body":"@cpuguy83 Is there an idea/plan what to do about this?\r\n\r\nAs far as I understand it the most reasonable option is to have the `VOLUME` command not actually do anything during build but only apply it as metadata that gets used when a container is created from the image?\r\n\r\nAlternatively I think @coding2012's [suggestion](https://github.com/docker/docker/issues/3639#issuecomment-144206271) sounds like a good move\r\n> I personally wish there was never a VOLUME directive for Dockerfiles, instead it should have always been inside the run syntax only.\r\n\r\nThough I don't know what the use-cases were for adding `VOLUME` to the Dockerfile syntax in the first place.\r\n\r\n\r\n"}}