Docker - ERROR: failed to register layer: symlink

Viewed 37272

I'm running a docker-compose file we have, I usually run it with command:

docker-compose up

But today I'm getting this error.

ERROR: failed to register layer: symlink ../bdf441e8145a625c4ab289f13ac2274b37d35475b97680f50b7eccda4328f973/diff /var/lib/docker/overlay2/l/7O5XKRTJV6RMTXBV5DTPDOHYNX: no such file or directory
4 Answers

enter image description here

To solve this issue, you just Stop and Start docker service from terminal.

# service docker stop
# service docker start

For me, this issue came up when I tried to clear the lib/docker/overlay folder by deleting all its contents (not a good thing to do). After that, I was not able to build any of my images back.

Solved it by running this

docker system prune --volumes -a

Warning: This removes all the volumes and its contents which may result in data loss. Which was fine for me since I already deleted everything.

Restart docker or if that doesn't work, do a Docker > Reset > Remove all Data.

I got the same error and the latter is the only thing that ended up working for me.

Related