38 karma · joined Aug 31, 2023 (3y ago) · 28 submissions
1.
Isolating Docker inside a development VM(msimkunas.lt ↗)
2 points · by exec1 · 2y ago · discuss
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
Of course, there’s also the question of dependencies. If I’m working on a project that I trust that pulls in hundreds of NPM dependencies, I implicitly trust that the project deemed those dependencies safe to pull in. It would be impossible to always operate on the assumption that you’re potentially pulling in hundreds of malicious packages so the chain of trust has to take over at some point.
However, I imagine you were more or less referring to singular projects that you don’t fully trust and like to experiment with in which case I agree with you and would probably use a VM without any kind of file sharing tbh.
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
Edit: the point here is about shifting the area of compromise. I would very much prefer to compromise on IO performance when writing/reading files with my IDE rather than sacrifice the web server performance on the guest.
comment 3y ago · link · parent
comment 3y ago · link · parent
The main advantage of this approach is that your code resides on a native file system. This allows you to take advantage of this performance gain where it matters most, which for me is during runtime (I develop web applications and IO performance is of paramount importance). I care much, much less about performance on the host side.
comment 3y ago · link · parent
Yes, virtio-fs is an option but I should have added that one of my goals was to not lock myself into a platform… I want to have the possibility of running my VMs on Windows as well and Samba seems like the easiest choice there. Just spin up a Samba share inside the VM, mount it on the Windows host and you’re good to go. No need to install any additional dependencies on the host.
I’ve tried the Windows NFS driver for Vagrant a while back and my conclusion is that it’s best not to force a square peg into a round hole… Not to mention that these custom solutions can experience software rot throughout the years.
comment 3y ago · link · parent
I gave this setup a go with PhpStorm. Host-to-VM sync is pretty seamless but you always have to manually sync changes from the guest to the host, so there’s that. Additionally, syncing can be very slow on large directory trees. I often found myself staring at a loading animation waiting for the IDE to catch all the changes and sync them to the guest.
AFAIK it is not recommended to open a project located on a network drive in a Jetbrains IDE but my experience with it so far has been great. Latency is not a concern because the VM is local.
Most importantly, I wanted to avoid a syncing situation where you have the source and the destination with two possibly differing states. This difference implies the possibility of conflicts which complicates things even further.
28.
Keep your files inside your VM(msimkunas.lt ↗)
85 points · by exec1 · 3y ago · 71 comments