{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/29014","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/29014/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/29014/comments","events_url":"https://api.github.com/repos/docker/docker/issues/29014/events","html_url":"https://github.com/docker/docker/issues/29014","id":192768309,"number":29014,"title":"Dockerignore multi-dir wildcard issue","user":{"login":"s0x","id":709497,"avatar_url":"https://avatars.githubusercontent.com/u/709497?v=3","gravatar_id":"","url":"https://api.github.com/users/s0x","html_url":"https://github.com/s0x","followers_url":"https://api.github.com/users/s0x/followers","following_url":"https://api.github.com/users/s0x/following{/other_user}","gists_url":"https://api.github.com/users/s0x/gists{/gist_id}","starred_url":"https://api.github.com/users/s0x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s0x/subscriptions","organizations_url":"https://api.github.com/users/s0x/orgs","repos_url":"https://api.github.com/users/s0x/repos","events_url":"https://api.github.com/users/s0x/events{/privacy}","received_events_url":"https://api.github.com/users/s0x/received_events","type":"User","site_admin":false},"labels":[{"id":73616520,"url":"https://api.github.com/repos/docker/docker/labels/area/builder","name":"area/builder","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-01T06:55:14Z","updated_at":"2016-12-01T20:54:47Z","closed_at":null,"body":"## Description\r\n\r\nThe multi-dir wildcard does not behave like described in the documentation. In case a particular file should be ignored, the pattern matches every file which ends with the same name also.\r\n\r\n## Steps to reproduce the issue:\r\n1. Create a file .example and some.example in the root or any subdirectory\r\n2. Add \"**/.example\" to you .dockerignore\r\n3. Create a Dockerfile which includes a copy command such as `COPY . /`\r\n2. Build the image\r\n\r\n## Describe the results you received:\r\nNeither .example nor some.example is added to the image\r\n\r\n## Describe the results you expected:\r\nsome.example should be present in the image\r\n\r\n## Additional information:\r\n\r\nIn case you work with gradle projects, this behavior is quite important. (e.g. exclude .gradle but not settings.gradle or even build.gradle)\r\n\r\nThis issue seems to be present since Oct 14, 2015 (eddb14a). As I can see it, this is when the multi-dir wildcard was introduced.\r\n\r\nFile `pkg/fileutils/fileutils.go`:\r\n\r\nLine 172 states: Treat **/ as ** so eat the \"/\"\r\n\r\nFurthermore the documentation for this is quite misleading:\r\n\r\n```\r\nMatching is done using Go’s filepath.Match rules. A preprocessing step removes\r\nleading and trailing whitespace and eliminates . and .. elements using Go’s\r\nfilepath.Clean. Lines that are blank after preprocessing are ignored.\r\n```\r\n\r\nLine 135 on the other hand states that the filepath.Match is not used at all because of \"some really weird rules\". Line 141 makes use of its Error Message only.\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/264291881","html_url":"https://github.com/docker/docker/issues/29014#issuecomment-264291881","issue_url":"https://api.github.com/repos/docker/docker/issues/29014","id":264291881,"user":{"login":"duglin","id":1944671,"avatar_url":"https://avatars.githubusercontent.com/u/1944671?v=3","gravatar_id":"","url":"https://api.github.com/users/duglin","html_url":"https://github.com/duglin","followers_url":"https://api.github.com/users/duglin/followers","following_url":"https://api.github.com/users/duglin/following{/other_user}","gists_url":"https://api.github.com/users/duglin/gists{/gist_id}","starred_url":"https://api.github.com/users/duglin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duglin/subscriptions","organizations_url":"https://api.github.com/users/duglin/orgs","repos_url":"https://api.github.com/users/duglin/repos","events_url":"https://api.github.com/users/duglin/events{/privacy}","received_events_url":"https://api.github.com/users/duglin/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T20:54:46Z","updated_at":"2016-12-01T20:54:46Z","body":"I'm on it...."}}
{"actor":{"display_login":"duglin"}}