82

I did clone a project and in the first step when I tried to start the container, I did run windows CMD in my project root and I type this command:

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.

01F0
  • 1,228
  • 2
  • 19
  • 32
HesamHashemi
  • 949
  • 1
  • 3
  • 8
  • 2
    your problem seem to be the same as this one https://github.com/docker/compose/issues/9956 , take a look at the answers in this – Linh Nguyen Dec 15 '22 at 03:55

8 Answers8

167

For Windows Users

  1. Delete .docker directory. Which exists on PATH C:\Users\your-username\.docker
  2. Restart docker.
infiniteLearner
  • 3,555
  • 2
  • 23
  • 32
57

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)

pscheit
  • 2,882
  • 27
  • 29
21

Please follow these steps bellow:

  1. Stop Docker Desktop and all containers.

  2. Go to path:

~/.docker/contexts/meta/(some sha256)/meta.json

Using Windows it should be on:

C:\Users\YOUR_USER\.docker\contexts\meta\(some sha256)\meta.json

This meta.json file should be just full of NULLs or empty.

  1. Delete this hashed path with this meta.json file inside of it.
  2. 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.
Leon
  • 57
  • 5
Rafael Xavier
  • 956
  • 13
  • 13
4

Try to delete ".docker" folder. This helped in my case.

stackoff
  • 59
  • 3
1

Try to delete ".docker" folder. This helped in my case.

run- ".docker"- delete the folder

0

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!

allan
  • 949
  • 1
  • 10
  • 17
0
  1. Open folder C:\Users\<YOUR-USER-NAME>\
  2. Rename .docker directory. with .docker_temp
  3. Restart docker
  4. Run command docker-compose up --build

Its works!

GMKHussain
  • 3,342
  • 1
  • 21
  • 19
0

In linux environmnmet, you can do

rm -rf ~/.docker/contexts/meta/
SAB6
  • 311
  • 2
  • 6