{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/2548","labels_url":"https://api.github.com/repos/docker/compose/issues/2548/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/2548/comments","events_url":"https://api.github.com/repos/docker/compose/issues/2548/events","html_url":"https://github.com/docker/compose/issues/2548","id":122269048,"number":2548,"title":"Windows volume mapping works only from home directory","user":{"login":"tooda02","id":11247671,"avatar_url":"https://avatars.githubusercontent.com/u/11247671?v=3","gravatar_id":"","url":"https://api.github.com/users/tooda02","html_url":"https://github.com/tooda02","followers_url":"https://api.github.com/users/tooda02/followers","following_url":"https://api.github.com/users/tooda02/following{/other_user}","gists_url":"https://api.github.com/users/tooda02/gists{/gist_id}","starred_url":"https://api.github.com/users/tooda02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tooda02/subscriptions","organizations_url":"https://api.github.com/users/tooda02/orgs","repos_url":"https://api.github.com/users/tooda02/repos","events_url":"https://api.github.com/users/tooda02/events{/privacy}","received_events_url":"https://api.github.com/users/tooda02/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/compose/labels/group/windows","name":"group/windows","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-15T13:11:41Z","updated_at":"2015-12-15T15:40:50Z","closed_at":null,"body":"In Windows, the [Getting Started example](https://docs.docker.com/compose/gettingstarted/) works correctly only if the working directory is under the user's home directory (C:\\users\\username).  Otherwise, it fails with the message:\r\n\r\n    python: can't open file 'app.py': [Errno 2] No such file or directory\r\n\r\nwhich occurs because the /code directory is empty in the image.\r\n\r\nThe example Dockerfile is:\r\n\r\n    FROM python:2.7\r\n    ADD . /code\r\n    WORKDIR /code\r\n    RUN pip install -r requirements.txt\r\n    CMD python app.py\r\n\r\nand docker-compose.yml contains:\r\n\r\n    volumes:\r\n      - .:/code\r\n\r\nA standard Docker build produces a working image (that is, /code/app.py exists) regardless of the working directory.  However, `docker-compose up` creates a working image only if run from C:\\users\\username or one of its subdirectories."},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/164801811","html_url":"https://github.com/docker/compose/issues/2548#issuecomment-164801811","issue_url":"https://api.github.com/repos/docker/compose/issues/2548","id":164801811,"user":{"login":"tooda02","id":11247671,"avatar_url":"https://avatars.githubusercontent.com/u/11247671?v=3","gravatar_id":"","url":"https://api.github.com/users/tooda02","html_url":"https://github.com/tooda02","followers_url":"https://api.github.com/users/tooda02/followers","following_url":"https://api.github.com/users/tooda02/following{/other_user}","gists_url":"https://api.github.com/users/tooda02/gists{/gist_id}","starred_url":"https://api.github.com/users/tooda02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tooda02/subscriptions","organizations_url":"https://api.github.com/users/tooda02/orgs","repos_url":"https://api.github.com/users/tooda02/repos","events_url":"https://api.github.com/users/tooda02/events{/privacy}","received_events_url":"https://api.github.com/users/tooda02/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T15:40:50Z","updated_at":"2015-12-15T15:40:50Z","body":"@dnephin If I take docker-compose out of the picture by running:\r\n\r\n    docker build -t web .\r\n    docker run web\r\n\r\nthe container starts without error and I can exec a bash shell that shows the directory:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/11247671/11815089/fc399f88-a2fe-11e5-8b76-335e6655001a.png)\r\n\r\nNote that the example above is running outside the home directory.  So there is something about the interface between docker-compose and docker-machine that's causing this error.\r\n"}}