I have 2 machines, one is a Windows 10, another is a Ubuntu Desktop (Ubuntu Cosmic 18.10).
Both are connected via LAN.
I’ve saved an image file (.tar) using docker save in Windows’s folder and already shared that file to everyone. I can access that file OK using UI in Ubuntu Desktop.
Now I would like to use docker load from Ubuntu machine (I’ve already installed docker engine in this machine). The issue is I don’t know how to pass the shared file path to the docker load.
After googling around, I’ve found that smbclient can be used to access remote (shared) file from Windows. After installing that tool in Ubuntu, I could really get a file with the following command:
smbclient '\\WindowsMachine\sharedFolder' -c 'get hello.txt'
It reports some message showing that it works (although I’m not sure where the hello.txt is saved or even if it’s saved or not).
That command is just for testing smbclient tool. What I need is something like passing the file content read by smbclient to the docker load (using one command line). Here is what I’ve tried:
sudo docker load < "$(smbclient '\\WindowsMachine\sharedFolder' -c 'get hello.tar')"
It reports “No such directory or file”. I’ve also tried this:
smbclient '\\WindowsMachine\sharedFolder' -c 'get hello.tar' | sudo docker load
It reports nothing, the root prompt is not shown and not any text is shown (I thought it was working hard). But if I press Enter, a new text line is printed saying
Error processing tar file(exit status 1): Unexpected EOF
Could you please help me sort out this issue? If one command-line solution is not feasible, I must of course go for multiple-command line solution (I’ve also not known of any).