docker-compose up --build
and this message is shown to me:
docker endpoint for "default" not found.
I'll be more than happy if somebody helps me. When I write this command for the first time I had an internet problem it got paused, in second time started to download something then this message printed.
I tried to delete my old Containers, also I try with my VPN on and off, and restart docker in PowerShell.
–
For Windows Users
Delete .docker
directory. Which exists on PATH C:\Users\your-username\.docker
Restart docker.
–
This comment helped me better then nuking the whole directory:
https://github.com/docker/compose/issues/9956#issuecomment-1294483086
(check an empty meta.json in ~/.docker/contexts/meta/(somelong hash)/meta.json, delete it)
~/.docker/contexts/meta/(some sha256)/meta.json
Using Windows it should be on:
C:\Users\YOUR_USER\meta\(some sha256)\meta.json
This meta.json file should be just full of NULLs or empty.
Delete this hashed path with this meta.json file inside of it.
Restart Docker
Done.
Notes:
Please backup before deleting.
Don't be afraid to lost data because this way we should remove ONLY this NULL/Empty file (and folder). Just be aware to not delete any important files.
I couldn't get this working following all the suggestions. In the end I edited the empty meta.json file under C:\Users\USERNAME\.docker\contexts\meta\GUID\meta.json, and just pasted the following from a previously working file:
{"Name":"temp","Metadata":{"StackOrchestrator":"swarm"},"Endpoints":{"docker":{"Host":"unix:///var/run/docker.sock","SkipTLSVerify":false}}}
Then it started working again!
Open folder C:\Users\<YOUR-USER-NAME>\
Rename .docker
directory. with .docker_temp
Restart docker
Run command docker-compose up --build
Its works!
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.