{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/28645","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/28645/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/28645/comments","events_url":"https://api.github.com/repos/docker/docker/issues/28645/events","html_url":"https://github.com/docker/docker/pull/28645","id":190616718,"number":28645,"title":"Making docker local volume driver support external FS mount type","user":{"login":"ghostplant","id":12099308,"avatar_url":"https://avatars.githubusercontent.com/u/12099308?v=3","gravatar_id":"","url":"https://api.github.com/users/ghostplant","html_url":"https://github.com/ghostplant","followers_url":"https://api.github.com/users/ghostplant/followers","following_url":"https://api.github.com/users/ghostplant/following{/other_user}","gists_url":"https://api.github.com/users/ghostplant/gists{/gist_id}","starred_url":"https://api.github.com/users/ghostplant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghostplant/subscriptions","organizations_url":"https://api.github.com/users/ghostplant/orgs","repos_url":"https://api.github.com/users/ghostplant/repos","events_url":"https://api.github.com/users/ghostplant/events{/privacy}","received_events_url":"https://api.github.com/users/ghostplant/received_events","type":"User","site_admin":false},"labels":[{"id":175374554,"url":"https://api.github.com/repos/docker/docker/labels/status/0-triage","name":"status/0-triage","color":"EEEEEE","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-21T04:34:14Z","updated_at":"2016-11-21T04:49:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/28645","html_url":"https://github.com/docker/docker/pull/28645","diff_url":"https://github.com/docker/docker/pull/28645.diff","patch_url":"https://github.com/docker/docker/pull/28645.patch"},"body":"**- What I did**\r\nAllow docker local volume driver to mount fs using external mount command\r\n**- How I did it**\r\nThe volume will be mounted by external mount only if mounting type starts with '^'.\r\n**- How to verify it**\r\nFor all original mount type (tmpfs/nfs/..), it will be mounted by built-in mount and there will be no difference.\r\nFor mount type which starts with '^', it will be mounted by external mount command.\r\nTest Step:\r\n\r\nFor orginal:\r\n`# docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 --name foo`\r\n`# docker run -it --rm -v foo:/foo ubuntu:xenial ls -la /foo`\r\n\r\nFor advanced sFTP:\r\n`# apt-get install sshfs openssh-server`\r\n`# ssh-keygen -t rsa -P ''`\r\n`# mv ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys`\r\n`# ssh $(whoami)@localhost true # Make sure this step needn't input password`\r\n`# docker volume create --driver local --opt type=^fuse.sshfs --opt device=$(whoami)@localhost:/tmp  --opt o=StrictHostKeyChecking=no --name sftp1`\r\n`# docker run -it --rm -v sftp1:/sftp1 ubuntu:xenial ls -la /sftp1`\r\n\r\nFor docker swarm:\r\n`# docker service create -p 8443:8443 --mount type=volume,volume-opt=type=^fuse.sshfs,volume-opt=device=$(whoami)@localhost:/tmp,volume-opt=o=workaround=all:o=reconnect:o=StrictHostKeyChecking=no,source=user1-home,target=/sftp1 ghostplant/flashback`\r\n\r\nMaking docker local volume driver support external FS mount type. such as glusterfs, cephfs, fused-based fs (sshfs/curlftpfs/..) and so on. Options for each kind of fs-type are configurable via '--volume-opt'. To mount volume with external mount command, type option is supposed to start with '^'.\r\n\r\nSigned-off-by: CUI Wei <ghostplant@qq.com>"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/261842517","html_url":"https://github.com/docker/docker/pull/28645#issuecomment-261842517","issue_url":"https://api.github.com/repos/docker/docker/issues/28645","id":261842517,"user":{"login":"ghostplant","id":12099308,"avatar_url":"https://avatars.githubusercontent.com/u/12099308?v=3","gravatar_id":"","url":"https://api.github.com/users/ghostplant","html_url":"https://github.com/ghostplant","followers_url":"https://api.github.com/users/ghostplant/followers","following_url":"https://api.github.com/users/ghostplant/following{/other_user}","gists_url":"https://api.github.com/users/ghostplant/gists{/gist_id}","starred_url":"https://api.github.com/users/ghostplant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghostplant/subscriptions","organizations_url":"https://api.github.com/users/ghostplant/orgs","repos_url":"https://api.github.com/users/ghostplant/repos","events_url":"https://api.github.com/users/ghostplant/events{/privacy}","received_events_url":"https://api.github.com/users/ghostplant/received_events","type":"User","site_admin":false},"created_at":"2016-11-21T04:49:48Z","updated_at":"2016-11-21T04:49:48Z","body":"Thank you. @AkihiroSuda \r\nI didn't find ways to delete those old ARs, and the \"Reopen PR\" was unpressable."}}
{"actor":{"display_login":"ghostplant"}}