4 ms·
Try to use docker for Windows. Hyperv is extremely performant. In my day to day work I'm using Windows, but I'm constantly using a mixture of WSL and docker. I
by cube2222 9y ago
Try to use docker for Windows. Hyperv is extremely performant. In my day to day work I'm using Windows, but I'm constantly using a mixture of WSL and docker. I set up things like Cassandra, MySQL, debugging sessions, nginx using docker. For small Unix tools/launching my applications I use WSL. For other small tools I use powershell.
It took some time getting use to it, but now I actually do feel like in an utopia. No pain for the last 3-4 months or so. You do have to get proficient with docker though for this to work.
- drdaeman 9y agoSorry, but can you please share any recipes for mixing WSL and Docker, or you just meant that you use one or another on project-to-project basis (not together)? I know I can do basic commands (even building images with `docker -H 127.0.0.1 build -t foo .` works), but I failed to find any way to share WSL filesystem with the containers (`docker run -v $(pwd):/foo ...`).
- cube2222 9y agoWell, let's say my project's in C:\Development\Projects\MyAmazingProject I can open bash there (WSL), or start a container docker run -v C:\Development\Projects\MyAmazingProject:/mnt/project --net=host -it ubuntu bash Though i usually do this only when I need to debug something. (WSL can't spawn additional threads, which breaks for example Delve, the Go debugger) Need to connect to a cassandra db? docker run -it cassandra cqlsh mycassandraaddress Docker compose works well too. And because WSL has unified network interfaces with windows, I can easily start a process in WSL and access a DB which I've run in docker. I use docker from PowerShell, just saying.
- scotu 9y agojust as a note to whom might read the parent comment: correct me if I'm wrong but docker for windows is not available on windows home (I think you need windows pro, because home does not come with hyperv)... that's all :)
- cube2222 9y agojust as a note to whome might read both parent comments: yes, that's correct. I'd even add to this, that I absolutely wouldn't be able to use win 10 home as a development machine, pro is necessary for me.