7

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

veysiertekin
  • 1,731
  • 2
  • 15
  • 40

3 Answers3

7

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
Rakesh B E
  • 786
  • 4
  • 5
4

To fix this;

  • Close Docker
  • Remove containers manually
rm -rf ~/Library/Containers/com.docker.docker
  • Start docker and it will magically work!
veysiertekin
  • 1,731
  • 2
  • 15
  • 40
1

Such scenarios can be solved by cleaning unused containers of docker.

Run prune command to clear:

docker system prune -a

After this :: restart docker

Akkave
  • 303
  • 2
  • 4
  • 17
  • The only that worked for me. Thanks! I think I caused the the original problem by manually deleting big files inside the docker directory when my computer was running low on storage. – Evandro Coan Jun 13 '23 at 16:19