Docker /var/lib/docker/overlay2//merged: no such file or directory

Posted by

Error:

=> ERROR [2/6] RUN apt-get update -y                                                                                                                           0.0s
------
 > [2/6] RUN apt-get update -y:
------
Dockerfile:3
--------------------
   1 |     FROM ubuntu:20.04
   2 |
   3 | >>> RUN apt-get update -y
   4 |
   5 |     #Installing apache in non-interactive mode
--------------------
ERROR: failed to solve: failed to prepare sha256:5faf9c0a9efe4675ecd21a4ec417d51077d5e75da9e673161a94e7d6cd43f92c as ohiwsd821sba57sebrhjngkbo: open /var/lib/docker/overlay2/caf36a0a931197ff68cbddd7bfa39a9810bd182f4cda5efc5d408a64ee95aa39/.tmp-committed2050828856: no such file or directory

Solution

Step 1: Docker Cleanup:

docker system prune

Step 2: Overlay2 Cache Repair

sudo systemctl stop docker
sudo rm -rf /var/lib/docker/overlay2
sudo systemctl start docker

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x