{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/25484","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/25484/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/25484/comments","events_url":"https://api.github.com/repos/docker/docker/issues/25484/events","html_url":"https://github.com/docker/docker/issues/25484","id":169885934,"number":25484,"title":"service --mount type=bind creates path on host, but shouldn't","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},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/area/swarm","name":"area/swarm","color":"fbca04"},{"url":"https://api.github.com/repos/docker/docker/labels/kind/bug","name":"kind/bug","color":"FF8C94"},{"url":"https://api.github.com/repos/docker/docker/labels/priority/P1","name":"priority/P1","color":"eb6420"},{"url":"https://api.github.com/repos/docker/docker/labels/status/claimed","name":"status/claimed","color":"fef2c0"},{"url":"https://api.github.com/repos/docker/docker/labels/version/1.12","name":"version/1.12","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/57","html_url":"https://github.com/docker/docker/milestones/1.12.1","labels_url":"https://api.github.com/repos/docker/docker/milestones/57/labels","id":1907496,"number":57,"title":"1.12.1","description":"milestone to track issues that can possibly warrant a patch release.\r\n\r\nsee our Patch release policy for more information about the procedure;\r\nhttps://github.com/docker/docker/blob/master/project/PATCH-RELEASES.md\r\n","creator":{"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},"open_issues":43,"closed_issues":44,"state":"open","created_at":"2016-07-27T15:59:34Z","updated_at":"2016-08-08T10:01:28Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-08-08T10:01:28Z","updated_at":"2016-08-08T14:36:51Z","closed_at":null,"body":"Unlike `docker run` (where this behavior is present to preserve backward compatibility), `docker service create` should _not_ create paths on the host for bind-mounts.\r\n\r\nThis is also described in [the documentation](https://github.com/docker/docker/blob/861d4dc989ae738a1c219291a96333a7577b1699/docs/swarm/services.md#configure-mounts);\r\n\r\n> Bind mounts are file system paths from the host where the scheduler deploys the container for the task. Docker mounts the path into the container. **The file system path must exist before the swarm initializes the container for the task.**\r\n\r\nHowever, currently (1.12.0), the host path is automatically created if it doesn't exist:\r\n\r\n```bash\r\n$ ls /does-not-exist/\r\nls: cannot access '/does-not-exist/': No such file or directory\r\n\r\n$ docker service create --mount type=bind,source=/does-not-exist,target=/here/i/go --name=test nginx:alpine\r\n\r\n\r\n$ ls -la /does-not-exist/\r\ntotal 8\r\ndrwxr-xr-x 2 root root 4096 Aug  8 05:50 .\r\ndrwxr-xr-x 3 root root 4096 Aug  8 05:50 ..\r\n```\r\n\r\nWe should change this, before users start to rely on this behavior, and we can no longer remove it"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/238257462","html_url":"https://github.com/docker/docker/issues/25484#issuecomment-238257462","issue_url":"https://api.github.com/repos/docker/docker/issues/25484","id":238257462,"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":"2016-08-08T14:36:51Z","updated_at":"2016-08-08T14:36:51Z","body":"Oh, that looks simple; I can have a look #dibs"}}
{"actor":{"display_login":"thaJeztah"}}