5 ms·
> Using Docker with WSL is a breeze Have there been some updates recently? About a year ago we were trying to use Docker on a windows host at work, and dealin
by skohan 6y ago
> Using Docker with WSL is a breeze
Have there been some updates recently? About a year ago we were trying to use Docker on a windows host at work, and dealing with things like file system paths was a nightmare
- atonse 6y agoWSL is Linux. They run the unmodified Linux kernel in a pico-process an docker runs on top of that. Technically there shouldn’t be file system issues right?
- skohan 6y agoHow does it work with local directories? Is there a separate file system for WSL, or does the linux kernel translate windows fs paths or something?
- H12 6y agoIt's a separate filesystem, but from WSL you can access Windows files in mounted drives via the `/mnt/<drive letter>` directory.
- dboreham 6y agoAnd vice versa: linux home dir is at something like \\wsl$\ubuntu\home\username
- radicalbyte 6y agoIt's the same filesystem with some kind of translation/adapter. I love it because it makes supporting our multi-platform OSS projects easy. You do have the occasional issues regards line endings; that's the only negative I've had so far. EDIT: H12 is more accurate. The Linux OS is separate, but the Windows FS is mounted to a logical place and "just works".
- skohan 6y agoYes line endings for configuration files was one of the issues we ran into
- tw04 6y agoYes, there is a separate filesystem for WSL, but you can still traverse the Windows filesystem as well, including mounting external drives. You can also browse the linux filesystem from windows explorer as expectded. https://docs.microsoft.com/en-us/windows/wsl/compare-versions https://docs.microsoft.com/en-us/windows/wsl/compare-version... https://devblogs.microsoft.com/commandline/access-linux-filesystems-in-windows-and-wsl-2/ https://devblogs.microsoft.com/commandline/access-linux-file... https://community.openbiox.org/d/72-windows-subsystem-for-linux-2-is-available-now https://community.openbiox.org/d/72-windows-subsystem-for-li...
- exdsq 6y agoWSL2 is now just a regular VM
- alpanka 6y agoThere are some differences in the software thought.
- exdsq 6y agoTrue, but it uses a Linux kernel over hyper-v rather than a wrapper over the win32 api like WSL1 (from what I understand!)
- alpanka 6y agoYes, but it is a slightly modified distro which causes some issues And not all are minor. Not being be able to run LXC is a deal breaker for me.
- hda111 6y agoWhat makes you think WSL2 isn’t able to run LXC?
- imwillofficial 6y agoWSL2 is a custom Microsoft kernel
- rcarmo 6y agoIf you can't do what you want in it, please open a ticket on https://github.com/Microsoft/WSL https://github.com/Microsoft/WSL - there is also a repo for the kernel, but AFAIK technical feedback is best sent through this one. (disclaimer: not directly involved with WSL, just trying to help)
- exdsq 6y ago
- shawnz 6y agoWSL1 used a syscall translation layer in a "pico process", WSL2 simply uses Hyper-V
- guggle 6y agoI do have locking issues with some sqlite files. I guess it has to do with the fact that the filesystems are shared. I wish I had time to investigate more.
- dboreham 6y agoIt's even mode magical than that : the docker containers run inside a Linux kernel that is not the one running your WSL2 environment, but the two are in cahoots such that the filesystem is shared and hence container mounts are as fast as they would be on a bare metal Linux box (e.g. -v $PWD:/workdir).
- imwillofficial 6y agoIt’s not an unmodified kernel.
- shawnz 6y agoIt is basically an unmodified kernel. Like in any purpose-built usage of Linux, it is compiled with specific options and patches for the environment it is made to run in, but you can replace it with your own kernel image if you want.
- imwillofficial 6y agoIt's not an unmodified kernel.
- shawnz 6y agoCan you explain what modifications you believe it has that typical installations of Linux don't?
- imwillofficial 6y agoDon’t try to rephrase what I said to put words in my mouth. I stated a fact, which you can verify here if you please. https://github.com/microsoft/WSL2-Linux-Kernel https://github.com/microsoft/WSL2-Linux-Kernel Please let us know what you find.
- shawnz 6y agoI am not putting words in your mouth. I am trying to understand what your concern is. Every major vendor of Linux distributions maintains their own source tree with patches specific to their usage. That is the way Linux is normally used. So what? I don't see how it's useful to say that it's a "modified kernel" due to it being packaged for a specific application in a way that is necessary to use it.
- datavirtue 6y agoSeveral months ago. A year is a long time for the microsoft bleeding edge these days. You can come back to something a year later and it is completely revised in many respects. Bugs gone, new ones created and discovered, whole subsystems rewritten etc...
- kyriakos 6y agoenable WSL2, install Docker Desktop in windows and it just works. you dont even need to install docker in WSL, its done automatically and kept updated by docker-desktop.
- gizmo385 6y agoYou might also need to update some settings in your BIOS to enable the hypervisor, but once you get it working it's a breeze to use. WSL is really remarkable.