Machine: Add mount command for Windows

Created on 30 Jan 2018  路  4Comments  路  Source: docker/machine

The FUSE+SSHFS approach used in #4018 to mount remote volumes on Linux clients should be supported on Windows as well.

To help get this started, I forked a GUI app that used an analogous Dokany+SSH.NET approach, and added a CLI. Using this, it is possible to mount all volumes on the remote docker machine as drives.

Here's some Powershell I ran to test:

$ip = docker-machine ip
$l = [int][char]"M"
docker volume ls --format "{{.Mountpoint}}" | % {
    $arglist = "-d $([char]$l) -r $_ -h $ip -u root -x"
    echo $arglist
    start-process -NoNewWindow -FilePath "./sshfs.exe" -RedirectStandardInput ./pass.txt -ArgumentList $arglist
    $l = $l + 1
}

Which mounts all volumes from the docker-machine instance locally

image

Note that I'm ssh-ing in with a password for the root user, which I manually created. The docker user has no access to the volume folders, and Dokan does not have an analog for the allow_root option from SSHFS as far as I'm aware. Probably in order to do this properly you need a dedicated user that has access to the volume folders, or you should just give docker access.

Overall the approach is probably not as nice as #4018, given the relative immaturity of FUSE on Windows and the hacked together sshfs CLI, but it would be useful for Windows users looking to work with volumes on a remote docker machine.

Most helpful comment

Ok I tried today, the mount command on windows. I get response.

You must have a copy of the sshfs binary locally to use the mount feature.

Please update the docs, how to hack together the sshfs cli on windows so it works.
Or
Write to the docs, that windows sshfs is not supported.
I spend over 3 hours trying to figure this out and cursing docker toolbox. Finally I gave up. Please do something with it.

All 4 comments

Ok I tried today, the mount command on windows. I get response.

You must have a copy of the sshfs binary locally to use the mount feature.

Please update the docs, how to hack together the sshfs cli on windows so it works.
Or
Write to the docs, that windows sshfs is not supported.
I spend over 3 hours trying to figure this out and cursing docker toolbox. Finally I gave up. Please do something with it.

Ok I tried today, the mount command on windows. I get response.

You must have a copy of the sshfs binary locally to use the mount feature.

Please update the docs, how to hack together the sshfs cli on windows so it works.
Or
Write to the docs, that windows sshfs is not supported.
I spend over 3 hours trying to figure this out and cursing docker toolbox. Finally I gave up. Please do something with it.

I have the same issue but in my case on a mac book 6.1 using docker toolbox. Please any help will be appreciated

Wow .. no solution till now?

https://github.com/feo-cz/win-sshfs seems to be abandoned:

Latest commit
dcb33f3
on 20 Oct 2016

@deniercounter "Docker Machine is now in maintenance mode" #4537

Was this page helpful?
0 / 5 - 0 ratings