
Most reasonably sized projects involving Linux containers come with a bunch of automation scripts.

Compatibility with Linux toolchains and build scripts
Docker for mac disk image size windows#
This means that when you mount your project files in a container (with docker run -v ~/my-project:/sources ), docker will propagate inotify events and share the same cache as your own distro to avoid reading file content from disk repeatedly.Ī little warning though: if you mount files that live in the Windows file system (such as with docker run -v /mnt/c/Users/Simon/windows-project:/sources ), you won’t get those performance benefits, as /mnt/c is actually a mountpoint exposing Windows files through a Plan9 file share. Docker Desktop leverages that to handle bind mounts from a WSL 2 distro without involving any remote file sharing system. They just run in separate namespaces so that they have the illusion of running totally independently. They share the same Kernel, VFS cache etc. Running docker CLI from WSL will bring you… Awesome mounts performanceīoth your own WSL 2 distro and docker-desktop run on the same utility VM. Your project files should be stored within your WSL 2 distro of choice, you should run the docker CLI from this distro, and you should avoid accessing files stored on the Windows host as much as possible.įor backward compatibility reasons, we kept the possibility to interact with Docker from the Windows CLI, but it is not the preferred option anymore.
/ResizeDiskUtilityElCap-56b3defa3df78c0b135383d8.jpg)
The first and most important best practice we want to share, is to fully embrace WSL 2. We focused on compatibility to keep you happy with your current development workflow.īut to get the most out of Windwe have some recommendations for you. We and our early users have accumulated some experience working with it and are excited to share a few best practices to implement in your Linux container projects!ĭocker Desktop with the WSL 2 backend can be used as before from a Windows terminal.
Docker for mac disk image size for windows 10#
Docker Desktop WSL 2 backend has now been available for a few months for Windows 10 insider users and Microsoft just released WSL 2 on the Release Preview channel (which means GA is very close).
