Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to load docker configuration: .docker/features.json: input/output error

This my versions:

Windows 10 home ed.
Ubuntu WSL2 20.04 LTS
Docker latest build

This happen after I do cleanup with commands below

docker-compose down

#remove container
docker rm -vf $(docker ps -a -q)

#remove image
docker rmi -f $(docker images -a -q)

#remove container
docker volume rm $(docker volume ls -q)

when I run docker-compose build, error shown:

Failed to load docker configuration: open /home/happyboy/.docker/features.json: input/output error

then I check with

docker -v  (success)
docker-compose --version  (fail with same error of unable to load docker configuration)

still same error, failed to load docker configuration...

so I end up uninstall and reinstall docker to have docker-compose work again. after use for around 2 days, this compose error come up again...

This issue already happen twice in past few days. It will be problematic if every time I also have to reinstall docker.

anyone got solution?

like image 833
i need help Avatar asked Nov 28 '22 21:11

i need help


2 Answers

I got the same error when trying to run any docker-compose command on Ubuntu WSL2 20.04 LTS.

I make it work by renaming the ~/.docker folder:

mv ~/.docker ~/.docker_old

My docker version is:

Version: 20.10.7


Credit: GitHub Docker Issue Discussion

like image 64
Meninx - メネンックス Avatar answered Dec 05 '22 18:12

Meninx - メネンックス


I found this works in my win10 home edition.

step 1. Run > type in services.msc > select LxssManager and restart

step 2. restart docker exe

then go to ubuntu type in : docker-compose --version

like image 23
i need help Avatar answered Dec 05 '22 16:12

i need help