ERROR: readlink /var/lib/docker/overlay2: invalid argument

Dan*_*mos 2 windows docker docker-compose

This morning I was getting this error when executing docker-compose up

> docker-compose up
ERROR: readlink /var/lib/docker/overlay2: invalid argument
Run Code Online (Sandbox Code Playgroud)

小智 22

我认为更简单的方法是删除所有缓存和容器并再次拉取它们。

docker system prune --all
docker volume prune 
docker-compose up
Run Code Online (Sandbox Code Playgroud)

我认为这将解决错误。

  • 您可能不想删除卷,因为它们保存数据,最好找到损坏的映像并重新创建它 (2认同)

Dan*_*mos 5

The problem was that one or more image where corrupted.

I had to start running my images one by one with docker-compose up <service 1> <service 2>... until I found the broken one was the backoffice

Then I rebuilded that image with docker-compose build --no-cache <broken service> and finally everything started working nicely again.