'Docker /var/lib/docker/overlay2/<id>/merged: no such file or directory
I am getting following error and couldn't find any solution.
#9 [builder 3/5] COPY . /app
#9 sha256:deb3e9c3d0d018c2253369e84f48bc653a4796eebadd10de1a2bb60b4954e239
#9 ERROR: error creating overlay mount to /var/lib/docker/overlay2/93eywfuy5gffv03b5zcpgetvq/merged: no such file or directory
------
> [builder 3/5] COPY . /app:
------
error creating overlay mount to /var/lib/docker/overlay2/93eywfuy5gffv03b5zcpgetvq/merged: no such file or directory
Tried to clean up images, containers via following docker commands nothing help:
docker system prune -af
docker builder prune
docker rm $(docker ps -a -q)
docker rmi $(docker images -a -q)
# Tried to pull images without caches also failed
docker build --pull --no-cache -t "my-app" .
System detail: macOs Monterey
Solution 1:[1]
the fix is to edit /etc/docker/daemon.json file and add below content to it:
{ "storage-driver": "devicemapper" }
Reload the systemctl daemon:
systemctl daemon-reload
And restart docker service:
systemctl restart docker
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Rakesh B E |
