Fixing “error creating overlay mount” in Docker on Windows
Are you getting this cryptic error from Docker Desktop on Windows when trying to start your containers?
server error – error creating overlay mount to /var/lib/docker/overlay2/2f46169556/merged: invalid argument
Is your Docker Desktop app taking forever to start?
I wasted two days on this problem, searching for anything online that could fix it. Nothing worked. Then I realized the problem: the drive that holds my Docker data was full.
To fix:
- Free up space on the drive
- Stop Docker Desktop (may require rebooting to do so)
- Get rid of the existing Docker data by running these two commands:
wsl –unregister docker-desktop
wsl –unregister docker-desktop-data - Restart Docker Desktop
- Re-create all your containers