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
If you have ever run Docker on this host before, or if /var/lib/docker/ exists, move it out of the way so that Docker can use the new LVM pool to store the contents of image and containers.
Each container’s writable layer is mounted on a mountpoint in /var/lib/docker/devicemapper/mnt/. An empty directory exists for each read-only image layer and each stopped container. Each image layer is a snapshot of the layer below it. The lowest layer of each image is a snapshot of the base device that exists in the pool.
I'm running a docker-compose file we have, I usually run it with command: But today I'm getting this error. Show activity on this post. To solve this issue, you just Stop and Start docker service from terminal. Show activity on this post. Followed this answer just restarting docker fixed the problem. Show activity on this post.
The correct way to solve this problem is to move the docker data directory to another location where there is sufficient space. In my case this was my home partition. To do that I had to create a daemon.json file in /etc/docker and add the following lines to it: Then restart the docker service, if you are suing systemd this should be:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With