Drag-and Drop files into Remote Docker Volumes? reddit / selfhosted ---------------------------------------------------------------------- nosyrbllewe · 2023-09-30 18:44 How can I remotely access files in Docker volumes on an Ubuntu virtual machine from Windows in a drag-and-drop GUI, such as a mounted network drive in Windows? Previously I was using Docker Desktop on my main Windows computer (it was mostly a test-server in a sense) with bind mounts to my drives (e.g. C:\\Docker\\Volumes). I loved the simplicity of it as I could just drag in my files (e.g. eBooks) to the folder and be able to access them directly through my Docker services. Though, now I moved my Docker services onto a virtualized Ubuntu server (via Proxmox) for a more proper solution, but I now find it extremely cumbersome / complicated to get any files into the Docker volumes without resorting to the command line. I tried looking into doing SMB/Samba, NFS, WebDav, and/or FTP/SFTP to remotely access the files from the Docker Volumes, but I couldn't really find any workable solution. Pretty much everything I find is connecting to a network share from a Docker container, which is the complete opposite of what I want to do. I also want to move away from bind mounts to proper named volumes in Docker if possible (to remove dependency on the host machine). So, how can I easily move files into Docker volumes without using any command line to do so (command line to set it up is perfectly fine though)? I want to keep my homelab simple to use and low maintenance, but everything I see points towards a more professional setup along with the accompanying complexity. I feel like this should be dead simple, but for some reason doesn't seem to be at all. ---------------------------------------------------------------------- thekrautboy · 2023-09-30 19:43 Run a simple fileserver that provides a share, for example SMB or NFS. For something very lightweight and easy to manage, you could install [Cockpit](https://cockpit-project.org/) and use the [filesharing addons](https://cockpit-project.org/applications.html) to create SMB and NFS shares and manage access to them, all through a webinterface. Then add that share as a Docker volume (Docker speaks SMB and NFS) and attach it to your container. https://docs.docker.com/compose/compose-file/compose- file-v3/#driver_opts And access the share from your workstation for "drag & drop" file access. Be aware tho that depending on what filesharing protocol you chose, and how exactly the software in the container handles the access, you could run into issues when you modify files from your workstation while they are also being used by the container etc. This belongs to /r/Docker if you have more questions about that. ---------------------------------------------------------------------- nosyrbllewe · 2023-10-01 01:39 Thanks for the advice. I installed Cockpit and I like it a lot. I am having a bit of trouble with NFS (especially with Windows), so I will probably try and go with SMB (which also has the bonus of being more accessible from my Android too). Filebrowser does look nice, but not quite what I was looking for. Though, I might use it as a partial replacement to Nextcloud, which I feel is way too bloated. ---------------------------------------------------------------------- thekrautboy · 2023-10-01 01:44 If nothing major has changed recently that i missed, Windows doesnt directly support NFS, you would need to use SMB for that as i have noted. SMB has the advantage of being supported in more systems, like you mentioned Android apps for example, but the huge downside is that it is a shit protocol overall. But if its the only one you can use, well then. ---------------------------------------------------------------------- nosyrbllewe · 2023-10-01 02:11 From what I read Windows does support NFS natively, but you need to enable it in additional Windows features. It also has the downside of apparently requiring you to remount all the NFS network drives after every restart of the computer, which pretty much makes it not worth doing it at all. It is honestly frustrating that there isn't any decent/modern protocol for network shares. ---------------------------------------------------------------------- thekrautboy · 2023-10-01 02:13 Yeah, thats not what i would call native support. > It is honestly frustrating that there isn't any decent/modern protocol for network shares. There is, NFS. Windows is just the ugly duckling outsider that only likes to play, sort of, well with SMB and dislikes everything else. ---------------------------------------------------------------------- nosyrbllewe · 2023-10-01 02:53 I personally disagree. I feel that both NFS and SMB have their problems. Even Android is a pain with NFS, despite it being based on the Linux kernel. I also see a lot of people saying that SMB works better than NFS on Mac. On another note, I might consider doing something like SyncThing instead. While it isn't, actually a network share, I feel it might solve a lot of my problems. ---------------------------------------------------------------------- thekrautboy · 2023-10-01 02:55 Okay. ---------------------------------------------------------------------- adamshand · 2023-10-01 06:39 > I also want to move away from bind mounts to proper named volumes in Docker if possible (to remove dependency on the host machine). I don't understand this, how do bind mounts create a dependency on the host machine? That aside, if you're using bind mounts the easist way would be SFTP to the Ubuntu box. There are lots of clients, WinFSP, WinSCP, Filezilla etc. ---------------------------------------------------------------------- nosyrbllewe · 2023-10-01 15:53 It technically creates a dependency on the host OS, but is generally not a big deal. For example, a bind mount in Docker Desktop on Windows might be like C:\Docker\Data, but now if you want to move your Docker to Ubuntu, you can't use that path anymore as it isn't valid in Linux. ---------------------------------------------------------------------- Jealy · 2023-10-02 10:25 Excellent info, commenting for appreciation and as a reminder to check out later. Thanks! ---------------------------------------------------------------------- omfgitsasalmon · 2023-10-03 03:39 You just copy the folder over to ubuntu, then replace the bind mount with the new path. You mean you want to make it as seamless as possible? But the above mentioned way should be the best practice actually. And you only need to change 1 line in the code. Also, this makes backup much easier. ---------------------------------------------------------------------- nosyrbllewe · 2023-10-03 04:14 It isn't really about seamlessness. Using bind mounts is probably easier like you say (hence why I was using them in Docker Desktop on Windows before). It is more about the conceptual containerization of the data. Docker themselves recommend using volumes instead of bind mounts. ---------------------------------------------------------------------- omfgitsasalmon · 2023-10-03 04:28 In that case, the easiest is to set up the SSH for your container, then use sFTP to connect, then you can use the FTP app's drag and drog interface. Personally, I just install magic-wormhole and send files from there.