Docker - ERROR: failed to register layer: symlink

断了今生、忘了曾经 提交于 2021-02-20 06:25:30

问题


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

回答1:


enter image description here

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

# service docker stop
# service docker start



回答2:


Followed this answer just restarting docker fixed the problem.

https://stackoverflow.com/a/35325477/4031815




回答3:


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.




回答4:


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.



来源:https://stackoverflow.com/questions/44942790/docker-error-failed-to-register-layer-symlink

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!