Docker - ERROR: failed to register layer: symlink
To solve this issue, you just Stop and Start docker service from terminal.
# service docker stop
# service docker start
Followed this answer just restarting docker fixed the problem.
https://stackoverflow.com/a/35325477/4031815
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.