What is the docker-desktop-data distro used for when running docker desktop with the WSL 2 engine

The docker-desktop-data distro is used by the docker-desktop distro as the backing store for container images etc. When docker is run under Hyper-V the same result is achieved by mounting a VHD in the Hyper-V image but this isn’t possible with WSL2.

To quote from the docker blog introducing the new wsl2 backend:

This will create 2 WSL distros for you:

Docker-desktop, which I’ll call the bootstrapping distro
Docker-desktop-data, which I’ll call the data store distro

From a high level perspective, the bootstrapping distro essentially
replaces Hyper-V, while the data store distro replaces the VHD that we
previously attached to the VM.

The bootstrapping distro creates a Linux namespace with its own root
filesystem based on the same 2 iso files we mentioned earlier (not
entirely true, but close enough), and use the data-store distro as the
backing store for container images etc. instead of a VHD (WSL 2 does
not allow us to attach additional VHD at the moment, so we leverage
cross-distro mounts for that).

To prevent you from being able to wsl -d ubuntu-desktop-data the distro has a 0-byte /init.

The blog post is a great introduction to how docker on wsl works.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)