Home Explore Blog CI



docker

2nd chunk of `content/manuals/desktop/features/synchronized-file-sharing.md`
803ffbfe490c397f9b6b09756e3ccb969257515b3e4c3a590000000100000b28
A Synchronized file share behaves just like a virtual file share, but takes advantage of a high-performance, low-latency code synchronization engine to create a synchronized cache of the host files on an ext4 filesystem within the Docker Desktop VM. If you make filesystem changes on the host or in the VM’s containers, it propagates via bidirectional synchronization.

After creating a file share instance, any container using a bind mount that points to a location on the host filesystem matching the specified synchronized file share location, or a subdirectory within it,  utilizes the Synchronized File Shares feature. Bind mounts that don't satisfy this condition are passed to the normal virtual filesystem [bind-mounting mechanism](/manuals/engine/storage/bind-mounts.md), for example VirtioFS or gRPC-FUSE.

> [!NOTE]
>
> Synchronized file shares is not used by Kubernetes' `hostPath` volumes in Docker Desktop.

> [!IMPORTANT]
>
> Synchronized file shares isn't available on WSL or when using Windows containers. 

## Create a file share instance 

To create a file share instance:
1. Sign in to Docker Desktop.
2. In **Settings**, navigate to the **File sharing** tab within the **Resources** section. 
3. In the **Synchronized file shares** section, select **Create share**.
4. Select a host folder to share. The synchronized file share should initialize and be usable.

File shares take a few seconds to initialize as files are copied into the Docker Desktop VM. During this time, the status indicator displays **Preparing**. There is also a status icon in the footer of the Docker Desktop Dashboard that keeps you updated.

When the status indicator displays **Watching for filesystem changes**, your files are available to the VM through all the standard bind mount mechanisms, whether that's `-v` in the command line or specified in your `compose.yml` file.

> [!NOTE]
>
> When you create a new service, setting the [bind mount option consistency](/reference/cli/docker/service/create.md#options-for-bind-mounts) to `:consistent` bypasses Synchronized file shares. 

> [!TIP]
>
> Docker Compose can automatically create file shares for bind mounts. 
> Ensure you're signed in to Docker with a paid subscription and have enabled both **Access experimental features** and **Manage Synchronized file shares with Compose** in Docker Desktop's settings.

## Explore your file share instance

The **Synchronized file shares** section displays all your file share instances and provides useful information about each instance including:
- The origin of the file share content
- A status update
- How much space each file share is using
- The number of filesystem entry counts
- The number of symbolic links
- Which container(s) is using the file share instance

Selecting a file share instance expands the dropdown and exposes this information.

Title: How Synchronized File Shares Work and How to Create and Explore File Share Instances
Summary
Synchronized file shares create a synchronized cache of host files within the Docker Desktop VM using a high-performance engine and bidirectional synchronization. Containers using bind mounts pointing to the shared location utilize this feature; otherwise, they use the normal virtual filesystem bind-mounting mechanism. It is not compatible with Kubernetes `hostPath` volumes, WSL, or Windows containers. To create a file share instance, you must be signed into Docker Desktop, navigate to the File sharing tab in Settings, select 'Create share', and choose a host folder. The initialization status is displayed and the feature becomes available once file copying is complete and the status shows 'Watching for filesystem changes'. Additionally, bind mount consistency set to ':consistent' bypasses synchronized file shares. The Synchronized file shares section displays file share instances with information about origin, status, space usage, file counts, symlinks, and container usage.