Common topics (original) (raw)

Tip

If you do not find a solution in troubleshooting, browse the GitHub repositories or create a new issue:

Certificates not set up correctly

Error message

When attempting to pull from a registry using docker run, you may encounter the following error:

Additionally, logs from the registry may show:

Possible causes

Solution

Docker Desktop's UI appears green, distorted, or has visual artifacts

Cause

Docker Desktop uses hardware-accelerated graphics by default, which may cause problems for some GPUs.

Solution

Disable hardware acceleration:

  1. Edit Docker Desktop's settings-store.json file (or settings.json for Docker Desktop versions 4.34 and earlier). You can find this file at:
    • Mac: ~/Library/Group Containers/group.com.docker/settings-store.json
    • Windows: C:\Users\[USERNAME]\AppData\Roaming\Docker\settings-store.json
    • Linux: ~/.docker/desktop/settings-store.json.
  2. Add the following entry:
  3. Save the file and restart Docker Desktop.

Using mounted volumes and getting runtime errors indicating an application file is not found, access to a volume mount is denied, or a service cannot start

Cause

If your project directory is located outside your home directory (/home/<user>), Docker Desktop requires file sharing permissions to access it.

Solution

Enable file sharing in Docker Desktop for Mac and Linux:

  1. Navigate to Settings, select Resources and then File sharing.
  2. Add the drive or folder that contains the Dockerfile and volume mount paths.

Enable file sharing in Docker Desktop for Windows:

  1. From Settings, select Shared Folders.
  2. Share the folder that contains the Dockerfile and volume mount paths.

port already allocated errors

Error message

When starting a container, you may see an error like:

Or

Cause

Solution

To discover the identity of this software, either:

Then, decide whether to shut the other process down, or to use a different port in your Docker app.

Docker Desktop fails to start on Mac or Linux platforms

Error message

Docker fails to start due to Unix domain socket path length limitations:

Cause

On Mac and Linux, Docker Desktop creates Unix domain sockets used for inter-process communication. These sockets are created under the user's home directory.

Unix domain sockets have a maximum path length:

If your home directory path is too long, Docker Desktop fails to create necessary sockets.

Solution

Ensure your username is short enough to keep paths within the allowed limit:

Persistent notification telling me an application has changed my Desktop configurations

Cause

You receive this notification because the Configuration integrity check feature has detected that a third-party application has altered your Docker Desktop configuration. This usually happens due to incorrect or missing symlinks. The notification ensures you are aware of these changes so you can review and repair any potential issues to maintain system reliability.

Opening the notification presents a pop-up window which provides detailed information about the detected integrity issues.

Solution

If you choose to ignore the notification, it will be shown again only at the next Docker Desktop startup. If you choose to repair your configuration, you won't be prompted again.

If you want to switch off Configuration integrity check notifications, navigate to Docker Desktop's settings and in the General tab, clear the Automatically check configuration setting.

com.docker.vmnetd is still running after I quit the app

The privileged helper process com.docker.vmnetd is started by launchd and runs in the background. The process does not consume any resources unlessDocker.app connects to it, so it's safe to ignore.

Incompatible CPU detected

Cause

Docker Desktop requires a processor (CPU) that supports virtualization and, more specifically, theApple Hypervisor framework.

Solution

Check that:

See also,Hypervisor Framework Referencein the Apple documentation, and Docker DesktopMac system requirements.

VPNKit keeps breaking

Cause

In Docker Desktop version 4.19, gVisor replaced VPNKit to enhance the performance of VM networking when using the Virtualization framework on macOS 13 and later.

Solution

To continue using VPNKit:

  1. Open your settings-store.json file located at ~/Library/Group Containers/group.com.docker/settings-store.json
  2. Add:
  3. Save the file and restart Docker Desktop.

Docker Desktop fails to start when anti-virus software is installed

Cause

Some anti-virus software may be incompatible with Hyper-V and Microsoft Windows 10 builds. The conflict typically occurs after a Windows update and manifests as an error response from the Docker daemon and a Docker Desktop start failure.

Solution

For a temporary workaround, uninstall the anti-virus software, or add Docker to the exclusions/exceptions in your antivirus software.

Permissions errors on data directories for shared volumes

Cause

When sharing files from Windows, Docker Desktop sets permissions onshared volumesto a default value of0777(read, write, execute permissions for user and for group).

The default permissions on shared volumes are not configurable.

Solution

If you are working with applications that require different permissions, either:

Unexpected syntax errors, use Unix style line endings for files in containers

Cause

Docker containers expect Unix-style line \n endings, not Windows style: \r\n. This includes files referenced at the command line for builds and in RUN commands in Docker files.

Keep this in mind when authoring files such as shell scripts using Windows tools, where the default is likely to be Windows style line endings. These commands ultimately get passed to Unix commands inside a Unix based container (for example, a shell script passed to /bin/sh). If Windows style line endings are used, docker run fails with syntax errors.

Solution

Path conversion errors on Windows

Cause

Unlike Linux, Windows requires explicit path conversion for volume mounting.

On Linux, the system takes care of mounting a path to another path. For example, when you run the following command on Linux:

It adds a /work directory to the target container to mirror the specified path.

Solution

Update the source path. For example, if you are using the legacy Windows shell (cmd.exe), you can use the following command:

This starts the container and ensures the volume becomes usable. This is possible because Docker Desktop detects the Windows-style path and provides the appropriate conversion to mount the directory.

Docker Desktop also allows you to use Unix-style path to the appropriate format. For example:

Docker commands failing in Git Bash

Error message

Cause

Git Bash (or MSYS) provides a Unix-like environment on Windows. These tools apply their own preprocessing on the command line.

This affects $(pwd), colon-separated paths, and tilde (~)

Also, the \ character has a special meaning in Git Bash.

Solution

Portability of the scripts is not affected as Linux treats multiple / as a single entry.

Docker Desktop fails due to Virtualization settings

Cause

Solutions

Your machine must have the following features for Docker Desktop to function correctly:

WSL 2 and Windows Home
  1. Virtual Machine Platform
  2. Windows Subsystem for Linux
  3. Virtualization enabled in the BIOSNote that many Windows devices already have virtualization enabled, so this may not apply.
  4. Hypervisor enabled at Windows startup

WSL 2 enabled

WSL 2 enabled

Hyper-V

On Windows 10 Pro or Enterprise, you can also use Hyper-V with the following features enabled:

  1. Hyper-Vinstalled and working
  2. Virtualization enabled in the BIOSNote that many Windows devices already have virtualization enabled, so this may not apply.
  3. Hypervisor enabled at Windows startup

Hyper-V on Windows features

Hyper-V on Windows features

Docker Desktop requires Hyper-V as well as the Hyper-V Module for Windows PowerShell to be installed and enabled. The Docker Desktop installer enables it for you.

Docker Desktop also needs two CPU hardware features to use Hyper-V: Virtualization and Second Level Address Translation (SLAT), which is also called Rapid Virtualization Indexing (RVI). On some systems, Virtualization must be enabled in the BIOS. The steps required are vendor-specific, but typically the BIOS option is called Virtualization Technology (VTx) or something similar. Run the command systeminfo to check all required Hyper-V features. SeePre-requisites for Hyper-V on Windows 10 for more details.

To install Hyper-V manually, seeInstall Hyper-V on Windows 10. A reboot is required after installation. If you install Hyper-V without rebooting, Docker Desktop does not work correctly.

From the start menu, type Turn Windows features on or off and press enter. In the subsequent screen, verify that Hyper-V is enabled.

Virtualization must be turned on

In addition toHyper-V orWSL 2, virtualization must be turned on. Check the Performance tab on the Task Manager. Alternatively, you can type systeminfo into your terminal. If you see Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed, then virtualization is enabled.

Task Manager

Task Manager

If you manually uninstall Hyper-V, WSL 2 or turn off virtualization, Docker Desktop cannot start.

To turn on nested virtualization, seeRun Docker Desktop for Windows in a VM or VDI environment.

Hypervisor enabled at Windows startup

If you have completed the previous steps and are still experiencing Docker Desktop startup issues, this could be because the Hypervisor is installed, but not launched during Windows startup. Some tools (such as older versions of Virtual Box) and video game installers turn off hypervisor on boot. To turn it back on:

  1. Open an administrative console prompt.
  2. Run bcdedit /set hypervisorlaunchtype auto.
  3. Restart Windows.

You can also refer to theMicrosoft TechNet article on Code flow guard (CFG) settings.

Turn on nested virtualization

If you are using Hyper-V and you get the following error message when running Docker Desktop in a VDI environment:

Tryenabling nested virtualization.

Docker Desktop Access Denied error message when starting Docker Desktop

Error message

When starting Docker Desktop, the following error appears:

Cause

The user is not part of the docker-users group, which is required for permissions.

Solution

If your admin account is different to your user account, add it:

  1. Run Computer Management as an administrator.
  2. Navigate to Local Users and Groups > Groups > docker-users.
  3. Right-click to add the user to the group.
  4. Sign out and sign back in for the changes to take effect