3 ms·
Nice, I've been using qemu on my mac as am alternative to docker. I run arch linux in a vm with docker installed and an ssh daemon running on port 2222. On my m
by jillesvangurp 5y ago
Nice, I've been using qemu on my mac as am alternative to docker. I run arch linux in a vm with docker installed and an ssh daemon running on port 2222. On my mac, I simply point docker cli to use the vm by setting DOCKER_HOST=ssh://jilles@localhost:2222
Works great and it cut me loose from docker for mac. The networking was a bit of a pain in the ass to get going until I figured out that it basically does not work without libvirt installed as well. Basically none of the networking options do anything until you do that (I've tried them all).
- lovelyviking 5y ago> Basically none of the networking options do anything until you do that (I've tried them all). Can you share more? Is it completely impossible to make networking function in vm let's say debian x86 vm running on mac m1 without libvirt or it's very hard to configure?
- regularfry 5y agoHow are you doing volume mounts? That's where I tend to come unstuck.
- apatheticonion 5y agoI run Debian in a VM, use ssh and VSCode SSH tools to do work within the VM. Compilation, docker, everything happens in the VM and my MacOS host is just a thin client that hosts my code editor and browser. VSCode will automatically forward ports, but I prefer to manually manage port forwarding using `-L` and `-R` ssh arguments.
- lovelyviking 5y ago>I run Debian in a VM, use ssh Can you share how you configure networking for your Debian in a VM? Is it different for qemu running on mac m1 silicon?
- jillesvangurp 5y agoDon't tend to use those for development. But I imagine they would end up mounting directories inside the vm. You could get to those via scp or something like that.
- regularfry 5y agoThe problem tends to be getting inotify to work properly across the boundary. You want to propagate filesystem changes into the VM, in the ideal world. Docker-desktop's got some closed-source wizardry that makes it Just Work, I'm just not sure what's as slick in the open-source ecosystem.
- tallytarik 5y agoI’ve done something similar, although I ditched Docker at the macOS layer entirely and use Docker within my (Ubuntu) VM. I use Mutagen (https://mutagen.io/ https://mutagen.io/) for syncing files between macOS and the VM. Works well. (And overall, my Drupal project is about 20x faster through the VM than Docker for Mac, which I still find incredible)
- dnautics 5y agois official NFS over vsock a thing yet in QEMU?
- chriswarbo 5y agoI do a similar thing using Lima (which uses Qemu under the hood) https://github.com/lima-vm/lima https://github.com/lima-vm/lima (I'm not a fan of Docker, but unfortunately work on some projects that use it)