{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/1882","labels_url":"https://api.github.com/repos/docker/compose/issues/1882/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/1882/comments","events_url":"https://api.github.com/repos/docker/compose/issues/1882/events","html_url":"https://github.com/docker/compose/issues/1882","id":101607219,"number":1882,"title":"docker-compose uses previous volume from Dockerfile instead of the volume from docker-compose.yml","user":{"login":"geertvanheusden","id":1923423,"avatar_url":"https://avatars.githubusercontent.com/u/1923423?v=3","gravatar_id":"","url":"https://api.github.com/users/geertvanheusden","html_url":"https://github.com/geertvanheusden","followers_url":"https://api.github.com/users/geertvanheusden/followers","following_url":"https://api.github.com/users/geertvanheusden/following{/other_user}","gists_url":"https://api.github.com/users/geertvanheusden/gists{/gist_id}","starred_url":"https://api.github.com/users/geertvanheusden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geertvanheusden/subscriptions","organizations_url":"https://api.github.com/users/geertvanheusden/orgs","repos_url":"https://api.github.com/users/geertvanheusden/repos","events_url":"https://api.github.com/users/geertvanheusden/events{/privacy}","received_events_url":"https://api.github.com/users/geertvanheusden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-18T09:09:09Z","updated_at":"2015-08-26T13:02:36Z","closed_at":null,"body":"Hi,\r\n\r\nI encountered an issue when using `docker-compose` version 1.4.0.\r\nLet me try to explain it by describing the different steps I took.\r\n\r\n* Create a **Dockerfile** with the following content:\r\n\r\n```\r\nFROM debian\r\n\r\nVOLUME /test\r\n\r\nCMD ls -la /test\r\n```\r\n* Create a **docker-compose.yml** file in the same directory with the following content:\r\n\r\n```\r\ntest:\r\n    build: .\r\n```\r\n\r\n* Run the following commands:\r\n\r\n```\r\ndocker-compose build\r\ndocker-compose up\r\n```\r\n\r\n* The `ls` command should return zero files which is correct\r\n* Now create a **testsrc** directory with a file in it  and update the **docker-compose.yml** file to:\r\n\r\n```\r\ntest:\r\n    build: .\r\n    volumes:\r\n      - ./testsrc:/test\r\n```\r\n\r\n* Run `docker-compose up` again and you will see that the **test** directory in the container is still empty. This behaviour is unexpected and in my opinion incorrect.\r\n\r\n* Run `docker-compose rm` and `docker-compose up` and the result is correct. One file available in the volume on the container.\r\n\r\nRemoving the `volumes` line from the **docker-compose.yml** file will still result in one file available in the container when you don't execute the `docker-compose rm` command.\r\n\r\nIf this is not a bug it think the behaviour should be clearly explained in the docs.\r\n\r\nRegards,\r\n\r\nGeert"},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/135001632","html_url":"https://github.com/docker/compose/issues/1882#issuecomment-135001632","issue_url":"https://api.github.com/repos/docker/compose/issues/1882","id":135001632,"user":{"login":"brousselle","id":4159047,"avatar_url":"https://avatars.githubusercontent.com/u/4159047?v=3","gravatar_id":"","url":"https://api.github.com/users/brousselle","html_url":"https://github.com/brousselle","followers_url":"https://api.github.com/users/brousselle/followers","following_url":"https://api.github.com/users/brousselle/following{/other_user}","gists_url":"https://api.github.com/users/brousselle/gists{/gist_id}","starred_url":"https://api.github.com/users/brousselle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brousselle/subscriptions","organizations_url":"https://api.github.com/users/brousselle/orgs","repos_url":"https://api.github.com/users/brousselle/repos","events_url":"https://api.github.com/users/brousselle/events{/privacy}","received_events_url":"https://api.github.com/users/brousselle/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T13:02:36Z","updated_at":"2015-08-26T13:02:36Z","body":"i confirm this is incorrect behavior: as if you test it with docker run [...] with all the relevant options,  bypassing docker-compose then it works as expected.\r\ndocker 1.7.1 compose 1.4.0"}}